Set Static IP Address On Ubuntu Server 20.04

This post will show you how to set a static IP address on Ubuntu Server 20.04 using the netplan utility.


With Ubuntu Server 20.04 we use the netplan utility to configure a static IP address. Netplan is a new YAML based network configuration tool.

Note: Make sure you note down the name of your network adapter after running the following command.

ip a

To get started and configure a static IP address on a server open the netplan directory in the following location.


In the location, you will find a YAML with a name that is different from each system. Open config file (yaml).


In the below example, I am setting a static IP address on my Ubuntu server.

   version: 2
   renderer: networkd
    dhcp4: no
    addresses: []
    addresses: [,]

After saving the file, apply the IP configuration using the following command.

netplan apply

Success! You're on the list.