Home » Linux » Tips » Restart Network Ubuntu

Restarting the Network in Ubuntu [Instructions/Example]

If you’ve recently updated your network configuration or just can’t get things to connect, you may need to restart the networking services on your Ubuntu System to get things back up and running.

Restarting the network is particularly useful if you’re recently updated your WiFi network details or changed your IP address or hostname.

These examples will work for Ubuntu and should work for Ubuntu-based distributions like Pop!_OS and Linux Mint.

Restarting the Network Service from the Linux Terminal/Command Line

This is probably the solution you’re looking for – it works on Ubuntu desktop and servers without a GUI. It will completely restart the networking service and reload all configurations.

All of these commands are run with the sudo command to elevate the user to administrator/root privileges.

To restart the networking service, run the following:

sudo service network-manager restart

Restarting Networking on Ubuntu via the Desktop/GUI

To restart a specific network adapter from the Ubuntu desktop, click on the network icon in the top-right of the screen, expand the menu under the network adapter you want to restart, and turn it off.Ubuntu Restart Network

Repeat, this time toggling back on.

Done! That adapter should now take on any configuration changes made to it or notice any configuration change you’ve made to the wider network (for example, changes to DHCP or DNS you’ve made on your router).

This may not be enough, however – it may be necessary to completely restart the networking services from the command line as outlined above.

Restarting from the command line is also useful if you run a different desktop environment that doesn’t include options to start/stop a network interface.

Toggling Networking via the CLI

You could also use the nmcli package to restart the networking services:

sudo nmcli networking off

sudo nmcli networking on

nmcli is the Network Manager Command Line Interface. It comes installed with Ubuntu Desktop by default – it’s the command line equivalent of toggling the network via the GUI. You can find out more about it by running:

man nmcli

…to view the user manual.

Still having trouble connecting? Check out the dig command for diagnosing DNS issues.

You can also ping a range of IP addresses using fping to test your network.

New to networking? Here’s a crash course in calculating IP address subnets – including subnet masks, IP address ranges, and a reference on public/private IP addresses.

Photo of author
I'm Brad, and I'm nearing 20 years of experience with Linux. I've worked in just about every IT role there is before taking the leap into software development. Currently, I'm building desktop and web-based solutions with NodeJS and PHP hosted on Linux infrastructure. Visit my blog or find me on Twitter to see what I'm up to.

Leave a Comment