How to restart network on Ubuntu 20.04 LTS Focal Fossa

There exist various ways of restarting network on Ubuntu 20.04. Possibly the simplest way would be to restart network from GUI such as GNOME. Other ways would include the use of the command line and commands netplan and ip. Finally, the NetworkManager command line tool nmcli or the System V init scripts can be used to successfully restart network on Ubuntu 20.04 Focal Fossa.

In this tutorial the reader will be provided with comprehensive information on:

  • How to restart network from GUI
  • How to restart network using the netplan command
  • How to restart network using the ip command
  • How to restart network using System V init scripts
  • How to restart network by using the NetworkManager command line tool nmcli

System networking managed by networkd deamon on Ubuntu 20.04  Focal Fossa

System networking managed by networkd deamon on Ubuntu 20.04 Focal Fossa

Software Requirements and Conventions Used

Software Requirements and Linux Command Line Conventions
Category Requirements, Conventions or Software Version Used
System Installed or upgraded Ubuntu 20.04 Focal Fossa
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 20.04 LTS Focal Fossa step by step instructions

Restarting network from GUI desktop on Ubuntu 20.04

In case you are running the default GNOME GUI on your Ubuntu 20.04 the simplest way to restart the network is to click on the top-right network icon:

From there simply select network interface you wish to restart and click on the Turn Off menu option.

From there simply select network interface you wish to restart and click on the Turn Off menu option.



Once the network interface is turned off you can now turn it on by clicking on the connect menu option.

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.

Restarting network from command line on Ubuntu 20.04

The first step is to check how the system networking is managed. There are few options how your networking may be managed:by the NetworkManager or by the networkd daemon. The commands you choose from the below list will be only effective when selected for the appropriate network management configuration.

 check your network management configuration check the content of the  /etc/netplan/01-netcfg.yaml or /etc/netplan/50-cloud-init.yaml configuration file.

To check your network management configuration check the content of the /etc/netplan/01-netcfg.yaml or /etc/netplan/50-cloud-init.yaml configuration file. The configuration we are looking for is Renderer. From there you can see whether your system networking is managed by networkd deamon or NetworkManager. If no Renderer is defined your system is most likely managed by networkd daemon.



The first and recommended command to restart your network is:

$ sudo netplan apply

The above command will restart your network regardless network management configuration settings.

Network restart for networkd managed systems

The following commands will restart network interface enp0s3

$ sudo ip link set enp0s3 down
$ sudo ip link set enp0s3 up
Using ip command to restart network on the Ubuntu 20.04 Focal Fossa

Using ip command to restart network on the Ubuntu 20.04 Focal Fossa

Network restart for NetworkManager managed systems

$ sudo nmcli networking off
$ sudo nmcli networking on


Restart the network on the Ubuntu system by using the nmcli command line tool.

Restart the network on the Ubuntu system by using the nmcli command line tool.

Alternatively you can try to restart your network with System V init script:

$ sudo /etc/init.d/network-manager restart

Network restart for interfaces listed in /etc/network/interfaces

For all devices listed in the /etc/network/interfaces the following command can be used to restart the listed network interfaces. Please note that if the ifdown or ifup command is missing you need to install the ifupdown package first.

$ sudo ifdown -a
$ sudo ifup -a