How to configure static IP address on Ubuntu 18.04 Server

configure static IP address on Ubuntu 18.04 Server is difference complete with other version of Ubuntu Server. Here a fast guide How to configure static IP address on Ubuntu 18.04 Server

Use this command to open new config file

sudo nano  /etc/netplan/50-cloud-init.yaml 

You will see the content like this:

How to configure static IP address on Ubuntu 18.04 Server
How to configure static IP address on Ubuntu 18.04 Server

Just change the ip like this one:

network:
     version: 2
     renderer: networkd
     ethernets:
         ens160:
            dhcp4: no
            dhcp6: no
            addresses: [192.168.155.228/24]
            gateway4: 192.168.155.254
            nameservers:
              addresses: [8.8.8.8,8.8.4.4]
How to configure static IP address on Ubuntu 18.10 - 02
How to configure static IP address on Ubuntu 18.10 – 02

Save the file – and apply changes with command:

sudo netplan apply
How to configure static IP address on Ubuntu 18.10 - 03
How to configure static IP address on Ubuntu 18.10 – 03

So you’re done ^^

Have a Nice Day…

About Netplan
Netplan new command-line network configuration had been introduced to Ubuntu 18.04 LTS Bionic Beaver to manage and configure network settings in new Ubuntu systems allows to configure a network interface using YAML abstraction .

Leave a Reply

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