Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
add comment

1 Answer

up vote 4 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
add comment

Your Answer

 
discard

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.