Server Fault is a question and answer site for system and network administrators. 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've broken my window manager on my Debian 6 machine, and so I am stuck to recovery mode for now. That is, I got a plain root shell. Now here's my problem: how can I get a internet connection, so I can pull new sources and compile my window manager?

ifconfig eth0 up
/etc/init.d/network-manager restart

does not work. eth0 is up, but I cannot access the internet. What's wrong?

share|improve this question
up vote 7 down vote accepted

Try dhclient eth0 if it's a direct connection to your ISP or there's a DHCP server in your network.

Can you ping hosts in your network, if any? Please post the output of ifconfig eth0 and route -n.

share|improve this answer
dhclient did the job. Thanks man! – DebiMan Jun 18 '11 at 19:55
ip addr sh and ip ro sh - also come to play as ifconfig and route should be considered deprecated (but yes, they still work). – cstamas Jun 18 '11 at 21:02
@cstamas: true, but old habits die hard! netstat -nr can also replace route. – Eduardo Ivanec Jun 18 '11 at 21:06
nice, did not know the latter. – cstamas Jun 18 '11 at 21:10

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.