In this article, we would discuss how we can replace networkd with NetworkManager in Netplan – Ubuntu 22.04 release.
If we install Ubuntu Desktop, then it will have NetworkManager installed as default. But, if we have installed something like Ubuntu Server, then in that scenario networkd basically handles all the device configuration.
Note: Following operations would require you to have superuser privileges. In case you don’t have one then, we advise you to contact your System Administrator for assistance.
Netplan is used to configure Network on our system. It basically supports both the backends i.e. NetworkManager and networkd. Creating a YAML description is all we need to do.
The configuration file for Netplan –
If our devices are managed through networkd then, the file may have following instructions –
network: version: 2 renderer: networkd ethernets: enp0s3: dhcp4: yes
If we want to configure our devices through NetworkManager, then we need to make changes to renderer key.
networkd to NetworkManager in Netplan
Use a text editor, we have used nano –
sudo nano /etc/netplan/00-installer-config.yaml
Replace above instructions with the following –
network: version: 2 renderer: NetworkManager
Thereafter, to check whether the configuration provided is as per defined standards.
sudo netplan try
If everything is fine, then following message appears on the terminal –
To apply the configuration –
sudo netplan apply
Note: The above code for configuration files is indentation-sensitive.
Lastly, we need to restart NetworkManager service to reflect the changes.
sudo systemctl restart NetworkManager.service
From here onwards, we can use NetworkManager to configure devices.
In conclusion, we have discussed how to switch from networkd to NetworkManager in Netplan.