This article explains how to restart network services in Ubuntu 24.04.
In Ubuntu, a network refers to the system that enables devices to communicate with each other. Network components include network interfaces, protocols, network manager, and more.
If you make changes to network configuration files (like /etc/network/interfaces
or Netplan configurations), you need to restart the network services for those changes to take effect.
If you’re experiencing connectivity problems, restarting the network services can help resolve issues by resetting the network interface and re-establishing connections.
Learning how to restart the network services in Ubuntu can come in handy when troubleshooting connectivity issues.
There are multiple ways to restart the network services in Ubuntu. We will show you some of the ways to do it below.
Restart network services using Systemd
In most Ubuntu systems, the most common way to restart network services is to use the Systemd command.
To do that, run the command below.
sudo systemctl restart NetworkManager
sudo systemctl restart NetworkManager.service
Restart network services using the NetworkManager CLI
Another way to restart the network services in Ubuntu is to use the NetworkManager CLI command (nncli).
To do that, first, list the network interfaces by running the command below.
nmcli connection show
Then, use the command format below to turn down or up the network interface.
sudo nmcli connection down <interface_name>
Replace <interface_name> with the corresponding interface you want to turn down or up.
You can turn the network on/off entirely using the command below, thus restarting the network services.
sudo nmcli networking off
sudo nmcli networking on
Restart network services using the NetworkManager Text User Interface (nmtui)
Another way you can restart network services in Ubuntu is to use the NetworkManager Text User Interface (nmtui).
The nmtui command provides a simple and interactive way to manage network configurations.
Run the command below, select deactivate, and reactivate the network services.
nmtui
Use the screen to deactivate and reactivate the interface.


Restart network services using ifup / ifdown
Finally, you can use the ifup and ifdown to restart network services in Ubuntu. You will need to interface name to restart.
Run the command below to list all the interfaces.
ip a
Then, use the command format below to turn on/off the network interface.
sudo ifdown <interface_name>
sudo ifup <interface_name>
Replace the <interface_name> with the corresponding interface in your system.
For example, run the command below to shut down the enp0s3 interface.
sudo ifdown enp0s3
To bring up the same interface, run the command below.
sudo ifup enp0s3
That should do it!
Conclusion:
In summary, restarting network services in Ubuntu is essential for effective network management and troubleshooting. Here are the key points to remember:
- Restarting network services can resolve connectivity issues by resetting network interfaces.
- Various methods are available to restart network services, including:
- Using Systemd commands (
sudo systemctl restart NetworkManager
). - Utilizing the NetworkManager CLI (
nmcli
). - Employing the NetworkManager Text User Interface (nmtui).
- Executing ifup and ifdown commands for specific interfaces.
- Using Systemd commands (
- Always verify your network configurations after making changes to ensure connectivity.
- Regularly practicing these commands can help you become proficient in managing network services on Ubuntu.
Leave a Reply