Starting sometime around Ubuntu 18.04, the Ubuntu devs stopped using the classic /etc/init.d/networking
and /etc/network/interfaces
method of configuring the network and switched to some thing called netplan
. This has made a lot of people very angry and been widely regarded as a bad move. Is it possible to remove netplan
and use the correct /etc/network/interfaces
method for configuring the network?
Networking – Switch Back to /etc/network/interfaces in Ubuntu 18.04
18.04netplannetwork-managernetworking
Best Answer
The following procedure works for Ubuntu 18.04 (Bionic Beaver)
I. Reinstall the ifupdown package:
II. Configure your /etc/network/interfaces file with configuration stanzas such as:
III. Make the configuration effective (no reboot needed):
IV. Disable and remove the unwanted services:
Then, you're done.
Note: You MUST, of course, adapt the values according to your system (network, interface name...).
V. DNS Resolver
Because Ubuntu Bionic Beaver (18.04) make use of the DNS stub resolver as provided by SYSTEMD-RESOLVED.SERVICE(8), you SHOULD also add the DNS to contact into the /etc/systemd/resolved.conf file. For instance:
and then restart the systemd-resolved service once done:
The DNS entries in the ifupdown INTERFACES(5) file, as shown above, are only relevant if you make use of RESOLVCONF(8) or similar.