Replace systemd-networkd with Network Manager

If you prefer to use Network Manager instead of Netplan in Ubuntu, here are instructions on how to replace the network handler. By default, Ubuntu uses Netplan, and not many people are impressed with it. Network Manager, on the other hand, gives both a command line tool as well cli GUI that makes it easier to configure and manage network connections.

First, we need to update Ubuntu to the latest patch level:

# aptitude update && aptitude safe-upgrade

Once the patch process is complete, install the Network Manager

# aptitude install -y network-manager

Now, create a new file called manage-all.conf under /etc/NetworkManager/conf.d/ and insert the following two lines:

[keyfile]
unmanaged-devices=none

Save and close the file. Next, edit the /etc/netplan/50-cloud-init.yaml or whatever configuration file you’re currently using for netplan, and make sure that it contains only the following lines:

network:
    version: 2
    renderer: NetworkManager

Save and close the file. Run the following commands:

# netplan generate
# netplan apply

Now, run the Network Manager GUI and configure the network connection:

# nmtui

When done, reboot the server. Once rebooted, log in and run the following commands to disable systemd-networkd

# systemctl stop systemd-networkd.service systemd-networkd.socket networkd-dispatcher.service
# systemctl disable systemd-networkd.service systemd-networkd.socket networkd-dispatcher.service

 

Leave a Reply 0