Skip to content

Instantly share code, notes, and snippets.

@plembo
Last active April 23, 2022 04:46
Show Gist options
  • Save plembo/1c32e55baec63072e84d7a8923c9e705 to your computer and use it in GitHub Desktop.
Save plembo/1c32e55baec63072e84d7a8923c9e705 to your computer and use it in GitHub Desktop.
Ubuntu LTS Desktop with netplan and NetworkManager

Ubuntu LTS Desktop with netplan and NetworkManager

Until recently, I was happily running netplan and networkd on my personal Ubuntu 18.04 LTS Desktop, pretty much identical to the way things are set up on my server machines (except with those I start with a minimal setup using the Ubuntu Server iso).

Then something Gnome Shell-related came along that required NetworkManager. Turns out that when it comes to network status, the only piece of software the Gnome Shell can work with is NetworkManager. Thanks, freedesktop.org!

But the good news was that Canonical's netplan can work just just as well with NetworkManager as it can with networkd. https://netplan.io/examples.

Of course it can.

All I had to do was:

  1. Unmask and enable NetworkManager:
$ sudo systemctl unmask NetworkManager
$ sudo systemctl enable NetworkManager
  1. Stop and disable networkd:
$ sudo systemctl stop systemd-networkd
$ sudo systemctl disable systemd-networkd
  1. Edit /etc/netplan/01-network-manager-all.yaml to change my "renderer" from "networkd" to "NetworkManager".
# Let NetworkManager manage all devices on this system
network:
  version: 2
  renderer: NetworkManager
  1. Run netplan apply.

  2. Reboot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment