Enabling Network Manager on Ubuntu 22.04 LTS

Just a heads up: I did this in midnight, and I’m also drunk, so … Help yourself out.

I forget when, but Ubuntu introduced Network Manager just when most people gradually shift from /etc/network/interfaces to netplan /etc/netplan.

technically, the transition from netplan to Network Manager is simple, you modify your netplan config to say NetworkManager in render rather than networkd. Install Network Manager on apt or snap, start and enable the service, reapply netplan and it just works!

Unfortunately it’s not quite easy for me, so here’s my journey of switching to Network Manager and introduced an hour of downtime to my Mastodon instance.

  1. Install networkmanager from apt or snap. start it up
  2. switch netplan renderer from networkd to networkmanager.
  3. Restart network manager, run sudo nmcli d and see if the devices you use are connected. If so, skip to last step.
  4. If the device shows as unmanaged, then you might encountered this bug https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1638842 but first, check something else
  5. the interfaces might be managed by /etc/network/interfaces file. Instead of removing the file, you can go to NetworkManager’s config file to override it (forcefully manage these interfaces)
  6. Go to /etc/NetworkManager/NetworkManager.conf , there’s a line called ifupdown , and a managed value. Set it to true and try to restart NetworkManager, to see if it’s able to manage your network interface. If so, skip to last step.
  7. if step 5 and 6 didn’t solve the issue, you might be using Ethernet interfaces. And the bug tracker link on step 4 showed there’s a file that by default instruct Network Manager to not manage Ethernet.
  8. What you can do is, create a empty file at /etc/NetworkManager/conf.d/10-globally-managed-devices.conf. Restart NetworkManager after should be able to show your interfaces are managed.
  9. Once the interfaces are managed, you should configure the interfaces. The easiest way is to run nmtui and follow the prompt. After everything is done, make sure to restart and setup auto start for the service as system boots! Forget to do that’ll cause additional unnecessary downtimes at your system when it reboot.

Hope this helps! I might come back later to fix format and some styles, I might not. Good luck!

Scroll to Top