27.06.2025

How to Restart Network on Ubuntu – Step-by-Step Guide

First, it’s important to identify which network management tool your Ubuntu system is using, as different versions rely on different utilities. This determines the correct method to restart or reconfigure your network.

For example, Ubuntu 18.04 uses Netplan as its default network configuration tool. Netplan acts as a unified interface to manage network settings by generating backend configurations for either NetworkManager or systemd-networkd. Understanding which backend is active will help you apply the appropriate commands to restart the network service properly.

In earlier Ubuntu versions, tools like ifupdown or directly managing NetworkManager were common. Knowing your system’s network manager ensures that network restarts and changes are executed correctly without disrupting connectivity.

What is Netplan used for?

Netplan is a modern command-line network configuration tool introduced in Ubuntu starting from version 17.10. It simplifies network management by allowing you to define network interface settings using an easy-to-read YAML format. Netplan acts as an abstraction layer and works with backend network daemons such as NetworkManager and systemd-networkd (called "renderers"), which directly interact with the operating system kernel. Users can choose which renderer to use for applying and managing their network configurations.

It reads network configuration described in /etc/netplan/*.yaml and you can store configurations for all your network interfaces in these files.

So the first thing to do is to check what configuration files do we have in /etc/netplan/
We can check this out by using the command:

ls /etc/netplan/

Here we can see configuration file called “50-cloud-init.yaml”.

Now we need to read it to see configuration:

cat /etc/netplan/50-cloud-init.yaml

In the Renderer we can see the “NetworkManager” – that’s our active network manager.

To restart it simply run:

sudo service network-manager restart

And then to see it’s status run:

sudo service network-manager status

As we can see it’s active and running.

If you see “networkd” in the Renderer in the netplan configuration file you need to restart it with the command:

sudo systemctl restart systemd-networkd

And then to see it’s status run:

sudo systemctl status systemd-networkd

That’s all, network is restarted.

Conclusion

Restarting the network service on Ubuntu requires first identifying the network management tool your system uses, as different Ubuntu versions rely on different utilities such as Netplan, NetworkManager, or systemd-networkd. By checking your Netplan configuration files, you can determine the active renderer and use the appropriate commands to restart the network service safely. Properly restarting the network ensures minimal downtime and stable connectivity, making it easier to apply configuration changes or troubleshoot network issues on your Ubuntu system.

FAQ