Remove netplan on Ubuntu 18.04

image_print
vi /etc/default/grub
GRUB_CMDLINE_LINUX="netcfg/do_not_use_netplan=true"
update-grub

Purge netplan

apt purge netplan.io

Remove files

rm -rf /usr/share/netplan
rm -rf /etc/netplan

Install ifupdown

apt install ifupdown

Configure interfaces

vi /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

Dynamic IP (DHCP)

# The primary network interface
auto eth0
iface eth0 inet dhcp

Static IP

# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.0.10
netmask 255.255.255.0
gateway 192.168.0.1
broadcst 192.168.0.255
dns-nameservers 192.168.0.2 192.168.0.3
dns-search lan

Reboot

shutdown -r now