These directions have been tested also to Ubuntu 18.04.1 and will very likely work also for any future release using
There's no need at all to fiddle with GRUB nor any manual file removal.
The configuration set up in
/etc/networking files and directories will survive reboots.
These are the verified steps:
- Check the actual interface names you are interested in with
ip l for the links (aka interfaces) and with
ip a for addresses.
sudo apt -y install ifupdown.
sudo apt -y purge netplan.io.
/etc/network/interfaces.d accordingly to your needs (
man 5 interfaces can be of some help with examples).
- Restart the
networking service with
sudo systemctl restart networking; systemctl status networking or
sudo /etc/init.d/networking restart; /etc/init.d/networking status. The output of the
status command should mention
active as its status.
- The command
ip a will show whether the expected network configuration has been applied.
- Optionally, manually purge the remants of the netplan configuration files with
sudo rm -vfr /usr/share/netplan /etc/netplan.
No reboot is needed in order to "refresh" the IP configuration: it will be active as of step no.5 . In case of troubles, double check the interface names. A typical IPv4 DHCP configuration will resemble this one:
iface enp0s3 inet dhcp
while a static IPv4 address can be configured like this:
iface enp0s3 inet static
#dns-nameservers 126.96.36.199 188.8.131.52
dns-nameservers entry won't work (thanks @Velkan for pointing it out!): the resolver is still using
systemd is providing his own resolution service from
So you can manually update it (no networking restart needed!):
But his would be only a temporary solution to vanish after the next reboot.
To get a permanent solution you need to edit
/etc/systemd/resolved.conf and add a line like this one to the "
Please, refer to
man 5 resolved.conf for the full documentation.
Finally, in the unlikely case any network service is not responding as expected, then that services may need a restart. But that's a weird non-standard network daemon behavior.