Ubuntu Linux changed the networking config, and it is done using YAML. Netplan is a utility for easily configuring networking on a Linux-based system. It supports both networkd and NetworkManager.
networkd is part of Systemd. In other word systemd-networkd used to manage network connections using Systemd. On the other hand NetworkManager is a GUI tool for configuring networking options.
You can tell Netplan to use NetworkManager and it is useful for Linux desktop or laptop users. By default all network devices get handled by systemd-networkd. Let us see how to change that on an Ubuntu Linux desktop.
Change netplan renderer from networkd to NetworkManager
The procedure is as follows:
- Open the Terminal window app
- Backup current config file using the cp command.
- Type the following command to edit your netplan config file
- Set renderer to NetworkManager
- Save and close the file
- Reboot the system
Let us see all commands in details.
How to change renderer from systemd-networkd NetworkManager
First view the config file using the cat command:
# This file describes the network interfaces available on your system # For more information, see netplan(5). network: version: 2 renderer: networkd ethernets: enp0s31f6: dhcp4: yes
The above config tells of bringing up the Ethernet interface named enp0s31f6 via DHCP.
Network Manager as the backend for netplan
Network Manager strives for Network Connectivity, which “Just Works” for new Linux users. The machine should use the wired network connection when it’s plugged in but automatically switch to a wireless connection when the user unplugs it. Similarly, you can easily configure a VPN network and many other options. Edit the config file using a text editor such as nano command or vim command
sudo cp -v /etc/netplan/01-netcfg.yaml /root/
sudo vim /etc/netplan/01-netcfg.yaml
Update it as follows:
# This file describes the network interfaces available on your system # For more information, see netplan(5). # Set and change netplan renderer to NetworkManager GUI tool network: version: 2 renderer: NetworkManager
Save and close the file. You can reboot the Linux computer or apply change by typing the following command:
sudo netplan apply
The above command applies the current netplan configuration to a running system.
How do I use a GUI tool to configure networking?
Open the Activities (press the Super key on your keyboard) overview and start typing Settings.
Next click on Network:
Now you can edit or and set new IP address. Select IPv4 or IPv6. Type in the IP Address and Gateway, as well as the appropriate Netmask. In the DNS section, switch the Automatic switch to off. Enter the IP address of a DNS server you want to use and so on: