Configure Static IP Address On Ubuntu 20 04 Server
Configure Static IP Address On Ubuntu 20 04 Server
From the configuration file, we can see the 'network' directive that has
2 elements. The first one is the 'ethernets' which specifies the network
interface and the second one is the version of the renderer which is
'systemd-networkd' for non-GUI instances and NetworkManager for
Ubuntu desktop (With GUI)
We are going to set the 'dhcp4' value to 'no' to disable the DHCP
protocol and specify the interface's Static IP as follows.
Save the YAML file and exit. To apply the changes made, run the
command:
You can use the ifconfig or ip command to verify that your network
interface is set to use the static IP configured moments ago.
Additionally, you can use the IP route show command to display the
new routes on your system.
$ ip route show