This new tool replaces the static interfaces (/etc/network/interfaces) file that had previously been used to configure Ubuntu network interfaces. Now you must use /etc/netplan/*.yaml to configure Ubuntu interfaces. The new interfaces configuration file now lives in the /etc/netplan directory. There are two renderers. NetworkManager and networkd. Use NetworkManager renderer for desktop computers manage through GUI and networkd is used for server to manage from the console. The Desktop users can easily add or modify IP address using GUI interface. Read this tutorial to configure IP address on Ubuntu 18.04 Desktop.

Setup Static IP on Ubuntu 18.04

First of all, check the network interface name on your system using ifconfig command. In my case, the network interface name is “enp0s3”. Now edit the following file. Add below content to file with your address and gateway details:

Save the file and apply the new settings to networkd by executing command: Your system is configured with an updated IP address. To view current IP of system use one of the below commands: