Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a VM running Ubuntu and I'm experimenting with the various networking options. The problem I have is that I don't know how to get Ubuntu to "refresh" the network connections after I have "unplugged a network cable" and "plugged in a different one". Only way I get it to work now is to reboot the VM which is a bit annoying.

It's using the server version of Ubuntu and I don't have a GUI, so I would like to know how to do this in the terminal.

share|improve this question
up vote 5 down vote accepted

You can restart networking as a whole or just the NIC (assuming eth0 - change to match your adaptor name) - as follows:

General networking restart

/etc/init.d/networking restart

NIC restart (on the console - ie: not remotely):

  ifdown eth0
  ifup eth0
share|improve this answer
That seems to work nicely, thanks! – Svish Jan 21 '11 at 13:47

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.