Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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'm debugging some things on my computer and I boot into recovery mode from the grub menu. Then it gives me a bunch of options on what to do next, and I select the one that drops it to a root shell. However, apt-get complains about not being able to resolve hosts whenever I try to install anything. I'm assuming this is because it is not connected to the internet. How can I enable the internet connection from the root shell?

share|improve this question

Plug it in to the router with an Ethernet cable and run the dhclient eth0 command.

share|improve this answer
An additional comment: dhclient configures a network interface (in this case eth0) -- "The Internet Software Consortium DHCP Client, dhclient, provides a means for configuring one or more network interfaces using the Dynamic Host Configuration Protocol, BOOTP protocol, or if these protocols fail, by statically assigning an address." – pzkpfw Jun 23 '12 at 19:59

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.