Sign in

Switching from NetworkManager to systemd-networkd


As the letter ‘d’ in the name of systemd-networkd infers for “daemon” mode, this service is meant to manage all network stuff in the background rather than NetworkManager is for setting network graphically up with the help of its GUI.


The core concept of this transition is very basic, and you need just turn off one service and turn on another service by using “systemctl” — this is for controlling and managingsystemdservices.


Firstly, we need to turn off the current service, which is “NetworkManager” with the following commands.

sudo systemctl stop NetworkManager
sudo systemctl disable NetworkManager
sudo systemctl mask NetworkManager
sudo systemctl unmask systemd-networkd
sudo systemctl enable systemd-networkd
sudo systemctl start systemd-networkd


Now, our helper, “netplan” will come to action. The “netplan”as a facilitator uses a “.yaml file to generate an appropriate configuration for the “systemd-networkd” and also force it to use that instruction. This file should be inside the “/etc/netplan” and a quick sample of that for a machine with both Ethernet and WiFi is as follows:

version: 2
renderer: networkd
dhcp4: true
dhcp6: true
dhcp4: yes
dhcp6: yes
password: "**********"


Please consider a backup, as it is highly recommended to provide a backup of this file to avoid any possible trouble and make the confidence of having a restore point.

ip a
# or
ip addr

Last Commands

As it is mentioned, we need to produce instruction to “systemd-networkd” which is basically could be provided by these commands successively:

sudo netplan generate
sudo netplan apply


To ensure that whether our machine is managing by “systemd-networkd”, all we have to do is using this command:

IDX LINK    TYPE  OPERATIONAL   SETUP _______________________________________
1 enp3s0 ether routable configured
2 wlp2s0b1 wlan routable configured

Network Menu

While the NetworkManager is disabled, its GUI shows an error message that is totally okay and should be ignored.

Screenshot of the Network Menu on Settings (Ubuntu)

Graduate Alumni from AUA

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store