Jump to content

Static IP on Ubuntu 20.04 Server


brent
 Share

Recommended Posts

Configure static IP address using Netplan

Netplan network configuration had been first introduced to Ubuntu 18.04 LTS Bionic Beaver. It is available to all new Ubuntu 18.04 installations. 

Ubuntu Server

To configure a static IP address on your Ubuntu 20.04 server you need to modify a relevant netplan network configuration file within /etc/netplan/ directory. 


 

network:
  ethernets:
    enp0s3:
      addresses: [192.168.1.3/24]
      gateway4: 192.168.1.1
      nameservers:
        addresses: [4.2.2.2, 8.8.8.8]
  version: 2

 

Once ready apply changes with:

$ sudo netplan apply

In case you run into some issues execute:

$ sudo netplan --debug apply
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...