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
# Restart the network
systemctl restart systemd-networkd
# Check the IP address
With more than 20 years of experience in the IT-Industry, Yves was – beside his work at the comdivision group – also involved with successfully bringing several (IT) startup companies to market. Yves was honoured several times by vendors and customers for his capability of transporting the highly technical IT concept to regular IT consumers using their language.