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've messed up my ubuntu. I uninstalled something that network-manager depended on and now I have to start the dhclient manually every time I log in. I've got a script that does the sudo dhclient eth0 but I have to punch in my password twice to log in: Once for the actual login and twice to get my dhcp running. How can I get dhclient just running automagically at every login?

share|improve this question
Just to make sure: what do you want to tell us with "start as root"? Are you logging in as root? – guntbert Apr 30 '13 at 19:58

add this line to the end of /etc/profile

dhclient eth0

share|improve this answer
Okay, I'll give that a try; Rebooting – Jason Apr 30 '13 at 19:16
Why not just sudo apt-get install network-manager ? – Scott Goodgame Apr 30 '13 at 19:20
Well when you say it like that the solution seems obvious. Honestly I thought I did that already. Well, make that an "answer" so I can give you credit. – Jason Apr 30 '13 at 19:30
did you solve the problem? – Hojat Taheri May 1 '13 at 4:01

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.