This article is a detailed guide to show you different methods to restart the network on Raspberry Pi.
How to Restart the Network on Raspberry Pi?
There are two ways to restart the network on Raspberry Pi and both methods are discussed below:
Method 1: Restart the Network by Using Network Manager
Network Manager is a tool used for performing network related tasks on the system. You can install this tool directly from source Raspberry Pi repository using the following command:
Once the Network Manager is installed, open the raspi-configuration tool using the below-mentioned command:
Then go to Advanced Options from the configuration tool:
Then further go to the Network Config option:
Select the NetworkManager option from the Network Configuration:
Then select Ok to complete the selection:
After which network manager will be activated
Then use the below-mentioned command to check the network service status using the Network Manager:
The output will display the status of the network whether it is active or not.
To restart the network service through Network Manager, use the following command:
A network will quickly restart as soon as you run the above command:
Method 2: Restart the Network Using nmcli Command
Nmcli command is another useful command-line tool that controls the Network Manager on the system. You can also use this command to restart the network on the Raspberry Pi system in case there is any problem from the network side.
The command also shows you the connection status of the available networks within your device range once you run the following command in the terminal:
The output of the above command will display the network status of all the available networks on Raspberry Pi.
Although my network is already connected, but if there is any other issue related to your network, you can turned it off using the following command:
Then turned it on again using the following command to fix the problem.
Conclusion
Restarting the network on the Raspberry Pi system helps users fix the network related issues. There are two methods to restart the network on the Raspberry Pi system. One can be done by installing the Network Manager tool while other is through nmcli command where the users have to turn off the networking option first and turn on again to fix the problem.