How to Restart Networking in Ubuntu

how to restart networking in ubuntu

How often do you restart your network services? Sometimes you might need to troubleshoot your network connection in case you have made changes to your network or simply cannot access the internet. In this article, we'll focus on how you can restart networking service on Ubuntu 18.04 and older versions.

1) Using Graphic User interface

One of the ways you can restart networking on Ubuntu 18.04 is by using GNOME's GUI interface. Navigate at the top right corner of your screen and click on the network icon as shown to reveal the pull-down menu. You'll be able to locate and view your network connection type. In this case, I'm using a wired connection. You could be using a wireless connection for your case.

restart networking service on Ubuntu

Click on the network interface and click on 'Turn off' option to turn off the networking service.

restart networking service on Ubuntu

To turn on the networking service, head out to the top right corner and click on the arrow down icon. Be sure to locate your network interface that is turned off as illustrated below.

restart networking service on Ubuntu

Click on the interface to expand the options and thereafter, click on 'Connect'.

restart networking service on ubuntu

This will bring up the interface and resume network services as normal :-)

2) Using the Command line

For the command line geeks, a couple of options are available to you to achieve the same result. We'll discuss a few commands that you can use to restart networking service on Ubuntu 18.04.

Netplan

Netplan is a command line tool used for easily configuring networking service on Linux systems. To restart the networking service run the command below

$ sudo netplan apply

Systemctl

Since Ubuntu 18.04 is based on systemd init , you can also use systemctl as shown

$ sudo systemctl restart networkManager.service

Service

In addition, you can also use the service command to achieve the same result as shown.

$ sudo service network-manager restart

Nmcli

nmcli is yet another command line tool that's easy to use and saves you time when managing network interfaces. To restart networking service, run the following commands in succession.

$ sudo nmcli networking off
$ sudo nmcli networking on

Ifup/ifdown

Finally, we have the ifup/ifdown commands which can be used as follows

$ sudo ifdown -a
$ sudo ifup -a

For older versions of Ubuntu

For older versions of Ubuntu (14.04 LTS and earlier ), you can restart networking through the following commands

$ sudo service networking restart

or

$ /etc/init.d/ restart networking

Alternatively, you can stop and start networking service as an alternative to restarting networking service

To stop networking service in older versions of Ubuntu run

$ sudo service networking stop

or

$ sudo /etc/init.d/networking stop

After stopping the service, it's time now to start the service.

start networking service

To start networking service run

$ sudo service networking start

or

$ sudo /etc/init.d/networking start

It's a pretty simple command but how many times you end up issue restarting the network? Feel free to add any comment with your experience and share this article.

Read Also:

Jamie Arthur 12:05 am

About Jamie Arthur

James is a passionate Linux and Windows Systems Administrator with 4 years of experience in Linux, databases and Front-End development. He loves doing research on different Linux distributions and experimenting with installation and configuration of different services and features. His hobbies include swimming, reading novels and playing video games.

Author's All Posts
Like to become part of Linoxide Team and contribute tips? Contact us here.

Comments

Your email address will not be published. Required fields are marked *

All comments are subject to moderation.