Ubuntu Server 20.04 set static IP with netplan

First check if you have file

If the file exists, make sure, you have the following content in it.

Edit

Replace all content with

In the above cause 192.168.1.100 is your static IP address. 192.168.1.1 is the gateway. eth0 is the network interface name.

Older versions of netpan used gateway4 instead of routes.

Now try the changes with

If all is good, you can make changes permanent with

See IP

Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *