Ubuntu Restart Networking Command

by on January 13, 2008 · 4 comments· LAST UPDATED December 30, 2013

in , ,

How do I restart networking on Ubuntu Linux system from a shell prompt?

You can easily restart, stop, or start networking service under Ubuntu Linux using a shell prompt. You can also restart networking remotely over ssh session. However, please do not stop networking service over ssh session as you will loss connectivity to the remote server. You can use the following tools:

Tutorial details
DifficultyEasy (rss)
Root privilegesYes
Estimated completion time1m
a) /etc/init.d/networking script

b) service command - Run a System V init script such as networking.

The syntax is as follows to restart the networking on Ubuntu or Debian based operating systems.

Task: Restart networking under Ubuntu Linux

Open terminal (command line) and type the following commands:
$ sudo /etc/init.d/networking restart

How to restart the networking service?

You can use the service command following as well:
$ sudo service networking restart

Warning: Do not stop networking service over ssh session.

To start networking service, enter :

$ sudo /etc/init.d/networking start
$ sudo service networking start

To stop networking service, enter:

$ sudo /etc/init.d/networking stop
$ sudo service networking stop

A note about desktop users

If above command failed, try the following command:
$ sudo service network-manager restart

See also:
  1. See how to make changes to Ubuntu Linux network configuration by editing /etc/network/interfaces file.
Tweet itFacebook itG+ itDownload PDF versionFound an error/typo on this page?

{ 4 comments… read them below or add one }

1 vajorie October 7, 2011 at 3:15 pm

Interestingly enough, this command now says it is deprecated (due to a change in Debian code[1]). I think it still works, though probably for a limited time.

[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=565187


2 Shafiul April 5, 2012 at 3:00 pm

I like this site , really rich collection of solutions

i am from bangladesh , working as Project Manager

My wish to developed myself as a High level linux administrator

this site help me a lot daily


3 Abdul Hafeez Tahir May 5, 2014 at 2:39 am

slam i want to learn networking configuration in ubuntu using terminal


4 Ryan February 23, 2015 at 1:43 pm

i cannot execute the “service network restart”
it”ll display network unrecogonized service.
And also my apache is not working well.
after restarting apache ,apache page is not displaying after typing the localhost in my ubuntu system.
please help me guys.
thanks in advance.


Leave a Comment

Tagged as: , , , , , ,

Previous Faq:

Next Faq: