Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

I tried to use

sudo service networking restart


sudo /etc/init.d/network restart

but they both crash the window manager and I can no longer use my keyboard for input into X.

when I use the /etc/init.d/ method it complains saying that I should use the service utility

e.g. service networking restart

but it crashes just the same.

Is there a GUI method of restarting networking?

share|improve this question
Note that you might reanimate your keyboard, if you unplug and replug it - and it is hot pluggable, i.e. USB. – user unknown Dec 19 '12 at 20:02
I also faced similar issue on Gnome 3 on Ubuntu 13.03. Screen disorted as top bar gone. Short keys not worked. As no menu/Activies shown I get no way to operate the system. Luckily console was opened already. So reboot command can be typed. – kuldeep.kamboj Jul 22 '13 at 10:48
if you are looking for GUI method just open dash, type "Network" and select that. now press "On/Off" button to turn off and again click to on. your networking is restarted now. – KasiyA Sep 1 '14 at 18:28

14 Answers 14


sudo service network-manager restart


Ubuntu uses network-manager instead of the traditional Linux networking model. so you should restart the network-manager service instead of the network service. Or use ifup/down.

share|improve this answer
hmm, strange that restarting just networking breaks the system. Does it happen to you too or is it just me? – waspinator Dec 19 '12 at 21:25
@waspinator - it happens to me too. (FYI.) – Josh M. Dec 29 '13 at 3:31

Restarting networking on a desktop machine will cause dbus and a bunch of service to stop and never be started again, usually leading to the whole system being unusable.

As Ubuntu does event based network bring up, there quite simply isn't a way to undo it all and redo it all, so a restart just isn't plain possible. The recommended way instead is to use ifdown and ifup on the interfaces you actually want to reconfigure:

sudo ifdown --exclude=lo -a && sudo ifup --exclude=lo -a
share|improve this answer
I'm getting ifup: failed to open lockfile /run/network/.ifstate.lock: Permission denied even on --force – Dee Nov 15 '13 at 11:52
@Jorge Castro: is this behavior going to be fixed, or is it broken by design? – waspinator Jul 19 '14 at 20:52
@waspinator the bug is marked fixed as of march of this year: – Jorge Castro Jul 20 '14 at 4:03

You could try

ifconfig eth0 down && ifconfig eth0 up

(or whatever your network interface is called) to restart the network.

share|improve this answer
... as far as I know, this doesn't update the interface's config according to /etc/network/interfaces ... which you might want – moritz Mar 22 at 11:24
When using sudo: sudo ifconfig eth0 down && sudo ifconfig eth0 up. Otherwise if you are connected over ssh, you will have to reboot machine. – tarkeshwar Apr 23 at 11:06
after trying ifup/ifdown and the reg service networking call, this finally worked for me – Jon B Nov 9 at 4:15

Try using the indicator (top menu bar) to disable and then enable networking.

share|improve this answer

service network-manager restart doesn't work:

stop: Unknown job network-manager
start: Unknown job network-manager

The only thing that works is:

ifconfig eth0 down
ifconfig eth0 up
share|improve this answer

ubuntu CLI: to restart the network service either

sudo /etc/init.d/networking restart


ifdown eth0
ifup eth0
share|improve this answer
this doesn't work – codefreak Dec 1 '14 at 12:33

I've got the same issue. Its a known bug

Using service network-manager restart works through

share|improve this answer
sudo service network-manager restart


sudo service networking restart

Doesn't work on Ubuntu server 14.04


sudo ifdown eth0:0
sudo ifup eth0:0

Works. Change eth0:0 to your interface.

share|improve this answer

if ubuntu 14.04 Desktop or Server, you can restart you network by:

sudo -i
( ifdown $(ifquery --list -X lo|xargs echo) && ifup $(ifquery --list -X lo|xargs echo) )&
share|improve this answer
I get a ifdown: interface eth0 not configured RTNETLINK answers: File exists Failed to bring up eth0. – wolfgang Sep 22 at 15:58

In ubuntu 14.04 they have a new "feature" that makes it impossible to restart. Force the interface down and up works.

  sudo ip link set eth0 down
  sudo ip link set eth0 up
share|improve this answer
This does not restart the network services, that is, no retry for DHCP addresses etc. – Samveen Aug 1 '14 at 19:01

I do not really think there's GUI method - by default at least.

I'm also not sure what do You mean by 'restarting networking service', but I feel that the command below could make it.

sudo killall NetworkManager 

It's killing NetworkManger which automatically restarts after this. And it doesn't break the system. ;)

share|improve this answer

The command below works well in a server environment, without throwing errors.

sudo service networking start
share|improve this answer

If you can restart the network using the applet of NetworkManager, you do not need to restart NetworkManager itself (at least, most of the time).

In that case to restart all the connections, use this code from a shell or in a script:

nmcli nm enable false
sleep 5
nmcli nm enable true 

Details can be found in the NetworkManagar command-line interface manual page.

Notice that these commands acts as the applet, so they do not need any additional privilege (no sudo or whatever).

share|improve this answer

The solution is to reboot the operating system. The reason Ubuntu has so many new features is because the kernel is being developed in virtual space. Thus it becomes a developers behavior to reboot. Reboot, because the distributed operating systems hosting the virtual machine, perhaps even windows, keep running.

enter image description here

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.