How to Restart the Network on Ubuntu 22.04

In Linux distribution, the network manager is responsible for managing the network on your system.  The latest release of Ubuntu 22.04 provides the facility to change or restart the network status with the help of the Command Line Interface or Graphical User Interface. Restarting the network helps in setting the connection and resolving network connection issues.

In this write-up, we will provide you with a deep insight into the methods to restart the network on Ubuntu 22.04. The outcomes are as follows:

Let’s dig into the CLI method first:

Method 1: Restarting the Network on Ubuntu 22.04 Using CLI

The CLI of Ubuntu 22.04 offers various commands to manage the network. This section enlists various commands that can be used to restart the network on Ubuntu 22.04.

Method 1.1: Using nmcli Command

The nmcli utility is used to control the network’s connections. Using the nmcli utility, users restart the network on Ubuntu 22.04. For this purpose, follow the given steps one by one.

Step 1: Check device status

First, check the network status, whether it is connected or not. For this purpose, run the following command:

$ sudo nmcli device status

The output shows that the network is connected.

Step 2: Turn off the Network

To turn off the network, run the following command:

$ sudo nmcli networking off

The successful execution of the command shows that the network is disabled now.

Step 3: Switch on the Network

Now, to reconnect the network, utilize the below script:

$ sudo nmcli networking on

After this connection, the network’s active state will be restored.

Method 1.2: Using the Network Manager Service

The network manager service manages the network and connectivity settings on your device.

First, to check the network status on your device, use the below script:

$ systemctl status NetworkManager.service

The output showed that the network is in an active state.

To restart the network on Ubuntu 22.04, execute the below script in the terminal:

$ sudo systemctl restart NetworkManager.service

Upon successful execution, the network will take a quick restart.

Method 2: Restarting Network on Ubuntu 22.04 Using GUI

The Graphical-User-Interface is the utility that provides an easy and user-friendly interface to the user. You can graphically interact with Ubuntu 22.04 to restart the network using the following steps.

Step 1: Open the Network Menu

First, open the network menu and check the network status:

The wire is connected, and the network icon shows that the network is in an active state.

Step 2: Turn off Network

To turn off the network, click on “Wired Connected” and then click on the “Turn off” option:

It will disconnect the network of your device.

Step 3: Turn on Network

After turning off the network, choose the“Connect” button to turn on the network again:

It will connect to the network of your device.

Step 4: Check Network Status

Furthermore, the network restarts the process, and the user can check the network status of their device:

The output shows that the device is connected to the network.

Congratulations! You have learned the process for restarting the network on Ubuntu 22.04.

Conclusion

A user can restart the network on Ubuntu 22.04 with the help of the Command Line Interface or Graphical User Interface. Restarting the network refreshes the network connection quickly and resolves the errors, if any. This short blog illustrated the knowledge to restart the network on Ubuntu 22.04 using CLI and GUI. The CLI uses the nmcli utility and NetworkManager service while the GUI restarts the network graphically on Ubuntu 22.04.