Whenever a problem occurs with the system, the main solution is to perform a restart or reboot the system. Similarly, if a problem occurs with the network, then its easy treatment is to restart the network. There are many scenarios where you may need to restart the network on Ubuntu like settings of the network were changed or the active network connection not working properly. Restarting the network services is equally important for all Linux systems.

In this article, we will check how to restart the network on Ubuntu 22.04 and Ubuntu 20.04 systems.

Using the following different methods, you can restart the network on Ubuntu.

  1. Restart network using GUI
  2. Restart network using the command line

Depending on your ease, you can choose one that suits you.

Prerequisites

We are assuming that you are using the Gnome desktop on your Linux system. You should be logged in as a root user or you have sudo privileges to run all commands.

Method 1: Restart Network using GUI

When you restart the network using the GUI, then you can follow the following two different options.

Restart Network from the Desktop

In this method, you can restart the network from the Desktop. To do that, right-click on the top right corner on the network icon, and the following drop-down list will display on the right corner:

How to Restart Network on Ubuntu 22.04 linux shell ubuntu

Click on the ‘wired connected’ option from the list and select ‘Turn off’ that will disable the network connection.

<img alt="Turn off network connection" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/09/echo/word-image-1360.png" data-ez ezimgfmt="rs rscb10 src ng ngcb10 srcset" height="567" loading="lazy" src="data:image/svg xml,” width=”1038″>

Now, follow the above-mentioned process and again enable the network by clicking the connect option as follows:

<img alt="Connect to network" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/09/echo/word-image-1361.png" data-ez ezimgfmt="rs rscb10 src ng ngcb10 srcset" height="517" loading="lazy" src="data:image/svg xml,” width=”690″>

The network connection has been re-establish now.

Click on the arrow sign located at the top right corner and then choose ‘Settings’.

<img alt="Open Settings" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/09/echo/word-image-1362.png" data-ez ezimgfmt="rs rscb10 src ng ngcb10 srcset" height="541" loading="lazy" src="data:image/svg xml,” width=”709″>

You can also go into the Settings by using the application search bar as follows:

<img alt="GNOME settings manager" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/09/echo/word-image-1363.png" data-ez ezimgfmt="rs rscb10 src ng ngcb10 srcset" height="569" loading="lazy" src="data:image/svg xml,” width=”1178″>

You will see the following window on the desktop. Select the ‘network’ option from the left sidebar and here you can enable or disable the connected network connection.

<img alt="Network settings" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/09/echo/word-image-1364.png" data-ez ezimgfmt="rs rscb10 src ng ngcb10 srcset" height="810" loading="lazy" src="data:image/svg xml,” width=”983″>

Method 2: Restart network using the command line

Using this method, you can restart the network using the following different ways:

Restart Network using the service manager

The most simple and easiest way to restart the network using the network service manager. Launch the terminal and type the following command on it:

$ sudo service network-manager restart

<img alt="Restart network manager service" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/09/echo/word-image-1365.png" data-ez ezimgfmt="rs rscb10 src ng ngcb10 srcset" height="171" loading="lazy" src="data:image/svg xml,” width=”734″>

Verify

Use Systemd to Restart Network

Systemd has an array of system components that can also handle network services. Restart network service using systemd, directly restart the network services instead of going through any other hoops.

$ sudo systemctl restart NetworkManager.service

<img alt="Use systemctl command to restart network on Ubuntu" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/09/echo/word-image-1366.png" data-ez ezimgfmt="rs rscb10 src ng ngcb10 srcset" height="143" loading="lazy" src="data:image/svg xml,” width=”734″>

verify

Restart Network through the Nmcli

Nmcli is the most commonly used tool for managing network connections. You can turn off the connect using the following command:

$ sudo nmcli networking off

<img alt="network restart with nmcli" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/09/echo/word-image-1367.png" data-ez ezimgfmt="rs rscb10 src ng ngcb10 srcset" height="149" loading="lazy" src="data:image/svg xml,” width=”726″>

Use the command below to turn on the network connection.

$ sudo nmcli networking on

<img alt="Turn on network using nmcli" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/09/echo/word-image-1368.png" data-ez ezimgfmt="rs rscb10 src ng ngcb10 srcset" height="150" loading="lazy" src="data:image/svg xml,” width=”734″>

Verify

Using ifdown and ifup commands Restart Network

The ifdown and ifup commands are used to handle the different network interfaces on Linux.

These two packages are not preinstalled on Ubuntu. Therefore, you need to install these packages by using the following command:

$ sudo apt update && sudo apt install ifupdown -y

<img alt="Install ifup and ifdown scripts" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/09/echo/word-image-1369.png" data-ez ezimgfmt="rs rscb10 src ng ngcb10 srcset" height="477" loading="lazy" src="data:image/svg xml,” width=”737″>

To turn off the network, use the ifdown and turn it on by using the ifup command as follows:

$ sudo ifdown -a && sudo ifup -a

Restart Network using the nmtui

Nmtui is another tool for managing network connections and provides an interactive environment. This tool comes pre-installed by default on Ubuntu. Therefore, just launch it using the following command:

$ sudo nmtui

The following interface will display on the terminal:

<img alt="Start nmtui" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/09/echo/word-image-1370.png" data-ez ezimgfmt="rs rscb10 src ng ngcb10 srcset" height="471" loading="lazy" src="data:image/svg xml,” width=”735″>

Choose ‘Activate a connection’ using the downward arrow key and then hit ‘Enter’.Now, deactivate this connection by selecting the ‘deactivate’ option and hitting ‘Enter’.

<img alt="Deactivate network connection" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/09/echo/word-image-1371.png" data-ez ezimgfmt="rs rscb10 src ng ngcb10 srcset" height="476" loading="lazy" src="data:image/svg xml,” width=”727″>

Once the connection is deactivated, again ‘Activate’ this connection as follows:

<img alt="Activate network connection" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/09/echo/word-image-1372.png" data-ez ezimgfmt="rs rscb10 src ng ngcb10 srcset" height="472" loading="lazy" src="data:image/svg xml,” width=”730″>

Once the network is restarted, quit this application as follows:

<img alt="Quit nmtui" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/09/echo/word-image-1373.png" data-ez ezimgfmt="rs rscb10 src ng ngcb10 srcset" height="473" loading="lazy" src="data:image/svg xml,” width=”723″>

Restart network using the IP command

The IP command is one more alternative that you can use in managing the network connections on Linux.

First, you will find your target network interface by using the following command:

$ ip link show

<img alt="get network device name with ip command" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/09/echo/word-image-1374.png" data-ez ezimgfmt="rs rscb10 src ng ngcb10 srcset" height="242" loading="lazy" src="data:image/svg xml,” width=”728″>

Here, enp0s3 is our target network. Start the network by typing the following command:

$ sudo ip link set enp0s3 down

<img alt="Shutdown network link using ip command" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/09/echo/word-image-1375.png" data-ez ezimgfmt="rs rscb10 src ng ngcb10 srcset" height="160" loading="lazy" src="data:image/svg xml,” width=”736″>

$ sudo ip link set enp0s3 up

<img alt="Turn on network link with the help of the ip command" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/09/echo/word-image-1376.png" data-ez ezimgfmt="rs rscb10 src ng ngcb10 srcset" height="113" loading="lazy" src="data:image/svg xml,” width=”728″>

Conclusion

Restarting the network is a good solution for solving a network problem. If you still have the same problem then you can also reboot or restart your system. From the above all mentioned ways, I hope you have learned a lot.  But, in case of any issue, you can send us your feedback.