How to restart network in ubuntu server 14.04.04?
31,635
Solution 1
Ifdown ethx ; ifup ethx
Should do it
"service networking restart" isnt working in ubuntu, because other services are dependent on it, theres a more complete answer here https://askubuntu.com/questions/561046/why-is-service-networking-restart-not-working-in-14-04
Solution 2
You are probably using Network-Manager so that would use:
sudo service network-manager restart
When in doubt try:
sudo ifdown <interface>
sudo ifup <interface>
That should work, if doing this over ssh combine the commands:
sudo ifdown <interface> && sudo ifup <interface>
Give that a try.
Looks like this issue is related to the following:
http://bugs.launchpad.net/ubuntu/+source/ifupdown/+bug/1301015
Related videos on Youtube
Author by
zarker
Updated on September 18, 2022Comments
-
zarker over 1 year
I tried using
service network restart
and/etc/init.d/networking restart
, what command could I use now?-
Silent-Bob almost 8 yearsPlease add what happened when you executed those commands and what you expected instead.
-
zarker almost 8 yearsservice network restart network: unrecognized service
-
Mark Plotnick almost 8 yearsWhat is the output of
service --status-all 2>&1 | grep network
-
Bobu almost 8 yearsI'm curious if you are seeing this issue: bugs.launchpad.net/ubuntu/+source/ifupdown/+bug/1301015
-
-
zarker almost 8 yearsservice network-manager restart network-manager: unrecognized service
-
zarker almost 8 yearsI changed dns server,it didn't work
-
Bobu almost 8 yearsDid you try: sudo service network-manager restart
-
zarker almost 8 yearsYes,but that‘s server edition,could not find network-mamager