Yves' Blog

VMware Photon OS - Cheatsheet

As I start to use more and more Photon OS for smaller workloads and test scenarios I thought it might be good to collect some quick commands etc. which I constantly use had to research first. This will include standard network setup, the usual tools etc. If you miss anything let me know, happy to add something to the list.


Check the network status in Photon OS

To know how your network is configured (btw: default is DHCP) run the following command:

systemctl status systemd-networkd -l

Define a static IP address in Photon

To change the default network settings from DHCP to a fixed IP move the network DHCP file and change the content (see sample below), then restart the network, before you can use ping see below "Install ping on Photon OS":

mv /etc/systemd/networkd/99-dhcp-en.network /etc/systemd/networkd/10-static-en.network
# Edit the new file
vi /etc/systemd/networkd/10-static-en.network
# Restart the network
systemctl restart systemd-networkd
# Check the IP address
ip a

Reference: https://github.com/vmware/photon/blob/master/docs/photon-admin-guide.md#setting-a-static-ip-address

Install ping on Photon OS

I understand the need to keept Photon as small as possible, but certainly ping is a command we will need...

tdnf install iputils