How to restart network on Ubuntu 22.04 LTS Jammy Jellyfish

There exist various ways of restarting the network on Ubuntu 22.04 Jammy Jellyfish. Possibly the simplest way would be to restart the network from a GUI such as GNOME.

Other ways would include the use of the command line and commands like ip. Finally, the NetworkManager command line tool nmcli can be used to successfully restart network on Ubuntu 22.04 Jammy Jellyfish.

In this tutorial you will learn:

  • How to restart network from GNOME GUI
  • How to restart network using the ip command
  • How to restart network by using the NetworkManager command line tool nmcli
Restarting the network on Ubuntu 22.04 Jammy Jellyfish
Restarting the network on Ubuntu 22.04 Jammy Jellyfish
Software Requirements and Linux Command Line Conventions
Category Requirements, Conventions or Software Version Used
System Ubuntu 22.04 Jammy Jellyfish
Software N/A
Other Privileged access to your Linux system as root or via the sudo command.
Conventions # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
$ – requires given linux commands to be executed as a regular non-privileged user

Restarting network on Ubuntu 22.04 LTS Jammy Jellyfish step by step instructions



Restarting network from GUI desktop on Ubuntu 22.04

  1. In case you are running the default GNOME GUI on your Ubuntu 22.04 the simplest way to restart the network is to click on the top-right network icon:
    Expand the network settings menu from the top right corner of the desktop
    Expand the network settings menu from the top right corner of the desktop
  2. From there simply select network interface you wish to restart and click on the Turn Off menu option.
  3. Once the network interface is turned off you can now turn it on by clicking on the Connect menu option. Completing both steps will effectively restart your network.
    Clicking the connect button turns the network back on
    Clicking the connect button turns the network back on


Restarting network from command line on Ubuntu 22.04

There are at least two ways to restart the network on Ubuntu 22.04 from the command line. Both methods are covered below.

  1. The first method is used to restart an individual interface, by putting into a down state and then into an up state. You can see a list of all your network interfaces by using the ip a command. In the example below, we will restart the enp0s3 interface by putting it down and then up again.
    $ sudo ip link set enp0s3 down
    $ sudo ip link set enp0s3 up
    
    Restarting the network by putting the interface down and up
    Restarting the network by putting the interface down and up
  2. The next method is using the nmcli command which will turn NetworkManager completely off and back on. This will restart your entire network, not just an individual interface.
    $ sudo nmcli networking off
    $ sudo nmcli networking on
    
    Restarting the network by using the nmcli command on Ubuntu 22.04
    Restarting the network by using the nmcli command on Ubuntu 22.04

Closing Thoughts




In this tutorial, we saw how to restart the networking in Ubuntu 22.04 Jammy Jellyfish Linux. This included several methods, including via command line and GUI. Restarting the network is an essential tool in an administrator’s toolkit, since it is one of the most basic troubleshooting steps to try when ever there is a problem connecting to a network or remote host.