what is the correct way to restart network on the command line

Verde Denim tdldev at gmail.com
Thu Sep 29 16:54:01 UTC 2011

On Thu, Sep 29, 2011 at 12:43 PM, Wes James <comptekki at gmail.com> wrote:

> I've tried:
> sudo /etc/init.d/networking restart
> but get a deprecation error
> I googled this and it seems to have changed to:
> sudo ifdown eth0
> sudo ifup eth0
> but when I do that I get "interface eth0 not configured"
> I look in:
> /etc/network/interfaces
> and all it has is:
> auto lo
> iface lo inet loopback
> no eth0?
> where can I study up on networking on 11.04?
> The indicator in the Gnome menu bar can disconnect/reconnect
> connections or turn networking off or on - is it using scripts to do
> this work?
> Thanks,
> -wes
> Wes
There seems to be some discrepancy in the way this has been automated in
various releases. network-manager is supposed to work, but doesn't always.
It sounds from the description of your interfaces file that network-manager
is what you have been using. If you drop into a terminal and run (as sudo):
killall nm-applet and then nm-applet --sm-disable
what is the result?

If your default device is indeed eth0 (and not something else), you should
see it - unless the nm-appliet has gone awry again (as it has on my systems
numerous times).

If you're using ip addressing, you can always add the appropriate info to
the /etc/networking/interfaces file yourself.

If you're acquiring the address dynamically (a la dhcp), there is a client
that you can run - dhcp3 iirc, that should lease an address for you.

Other more knowledgeable than I will likely have more specific advise, but
this should get you a starting point.



> --
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20110929/d158ed54/attachment.html>

More information about the ubuntu-users mailing list