How to Restart Network on Ubuntu Linux

Network connectivity issues can be a common frustration for users of Ubuntu Linux. Whether you’re dealing with slow internet speeds, connection dropouts, or changes in network configuration, restarting your network services can often be a quick and effective solution. This guide will walk you through several methods to restart your network on Ubuntu Linux, ensuring you can get back online with minimal disruption.

In this tutorial you will learn:

  • How to use systemctl to restart the network service
  • How to use nmcli to disable and enable networking
  • How to manually bring network interfaces down and up
  • How to restart network services using the GUI
How to Restart Network on Ubuntu Linux
How to Restart Network on Ubuntu Linux
Software Requirements and Linux Command Line Conventions
Category Requirements, Conventions or Software Version Used
System Ubuntu Linux 16.04, 18.04, 20.04, 22.04, 24.04
Software NetworkManager, nmcli, iproute2
Other Access to Terminal or GUI
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

Understanding Network Interfaces

Before proceeding with the methods to restart your network, it’s essential to identify the network interface you wish to manage. You can list all available network interfaces on your system by executing the command ip link or nmcli device status. Look for entries such as eth0, wlp3s0, or similar, as these are your network interfaces.

Retrieve the network interface name
Retrieve the network interface name
  1. Restarting NetworkManager Service: A straightforward way to reset your network settings.
    $ sudo systemctl restart NetworkManager.service

    This command restarts the NetworkManager service, which is responsible for managing network connections in Ubuntu. It’s a quick and effective way to refresh your network settings.



  2. Using nmcli to Restart Networking: For those who prefer command-line utilities, nmcli is a powerful tool.
    $ sudo nmcli networking off && nmcli networking on

    This method disables and then re-enables networking, effectively restarting network services without the need to identify specific interfaces.

  3. Manually Restarting Network Interfaces: For granular control over individual network interfaces.
    $ sudo ip link set <interface-name> down
    $ sudo ip link set <interface-name> up

    Replace <interface-name> with the actual name of your network interface. This method is useful for troubleshooting specific connectivity issues related to a particular network interface.

  4. Restarting the Network Using GUI: For users who prefer graphical interfaces.
    Navigate to your system settings, then to the network settings pane. Disable and re-enable your network connection. This method varies slightly depending on your desktop environment but is generally found in the system settings or network manager applet.

    Restarting the Network Using GUI
    Restarting the Network Using GUI

Conclusion

Restarting your network services on Ubuntu Linux can resolve many connectivity issues quickly. This guide has provided several methods to accomplish this, ranging from simple command-line commands to using the graphical user interface. Whether you’re a seasoned Linux user or new to the operating system, these techniques can help you manage your network connections effectively.