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.


Replace all content with

In the above cause is your static IP address. 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 *