Canada  united states of america usa  linkedinfacebook   Call Us Today: 866.646.6461

Configure network in Ubuntu 18

ubuntu10The network configuration has changed in Ubuntu 18 from all the previous versions. The new version uses Netplan and it is somewhat harder if you don't know yaml. The discussion for pros and cons of this move by Ubuntu can be infinite (why change what's working; this is a tool, I don't want to learn the new ways, etc.), but this is a quick tutorial for quickly changing the IP address. (There's more information available on Netplan)

The network configuration files are located in /etc/netplan. Configuration file can be opened as below:

vim /etc/netplan/50-cloud-init.yaml

With comments removed, this is the configuration data for a simple DHCP setup:

dhcp4: true
version: 2

If you would like to setup a static IP, these are the options to use:

addresses: []
dhcp4: no
addresses: [,]
optional: true
version: 2

In the above example:

IP address:



No network or broadcast address needed. Subnet address is specified in the IP itself (ie:

Reboot the server or restart the network by applying the configuration:

netplan apply

ALT IT Consulting is an IT Support company that provides assistance to clients with any technology issues, including Linux, Windows and Mac systems.

Last updated Mar 17, 2019