≡ Menu

Ubuntu Restart Networking Command

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
RequirementsNone
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
OR
$ sudo service networking start

To stop networking service, enter:

$ sudo /etc/init.d/networking stop
OR
$ 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 itGoogle+ itPDF itFound an error/typo on this page?

{ 4 comments… add one }

  • vajorie October 7, 2011, 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

  • Shafiul April 5, 2012, 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

  • Abdul Hafeez Tahir May 5, 2014, 2:39 am

    slam i want to learn networking configuration in ubuntu using terminal

  • Ryan February 23, 2015, 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