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 recently upgraded from 11.10 to 12.04, and now NetworkManager isn't populating /etc/resolv.conf when connecting to wireless networks, when it had been working perfectly in 11.10. I'm not seeing any explicit errors in either the NM UI or in syslog. How do I diagnose what's wrong?

Edit: If I try to run resolvconf, I get the error "resolvconf: Error: /etc/resolv.conf isn't a symlink, not doing anything." What should it be a symlink to and/or how do I get NM to populate it? This says the symlink should point to /run/resolvconf/resolv.conf, but that file does not exist on my system.

share|improve this question
I have tried a combination of the below solutions and then edited resolv.conf to include nameserver because I had this problem about a year ago already and back then I think it had something to do with this line. After a restart the file was overwritten, but not with just comments but a different nameserver … line and some other things. Finally, it’s working… – Xufox Oct 26 '15 at 22:58
up vote 57 down vote accepted

Use following command and answer YES to enable dynamic updates:

sudo dpkg-reconfigure resolvconf

Worked for me on Ubuntu 12.04.

share|improve this answer
Worked perfectly. Have an old laptop with 12.04 a dead battery that I unplugged by accident. Could ping my home router but not get web pages. Oddly could access other wifi network. This gave me access through home network again. – Mark D Sep 18 '12 at 4:06
The question remains: Why was the symlink missing? This question is being addressed in bug #1000244 ( See comment #66 for my best guesses about the various causes of this problem. – jdthood Oct 28 '12 at 20:47
I had the same problem in 13.04 (out of thin air, NOT a new install), this solution worked for me to. – Radu Maris Sep 24 '13 at 7:44
I wish there was a 'tip' or 'buy-me-a-beer' button on stack-exchange for thanking people. – Crisfole Oct 23 '13 at 13:51

I had the same problem. Seems that Ubuntu is using a local resolver now. The fastest way to remove that is to comment out the following line in /etc/NetworkManager/NetworkManager.conf:


For more information, please take a look at this page.

share|improve this answer
Disabling that line and then restarting NM has no noticeable effect for me. The error still occurs and NM still refuses to populate resolv.conf. – Cerin May 15 '12 at 22:38
Did the trick for me. Thanks a lot! – please delete me Aug 21 '13 at 21:23
Thanks for this information! I also had to restart the network manager: sudo /etc/init.d/network-manager restart. – Ethan Leroy May 5 '14 at 17:14

If /etc/resolv.conf is a file then move it to /run/resolvconf/resolv.conf :

sudo mv /etc/resolv.conf /run/resolvconf/resolv.conf

Then create the symlink:

sudo ln -s ../run/resolvconf/resolv.conf /etc/resolv.conf
share|improve this answer
This helps. But easier and more reliable (typos) way for doing that is sudo dpkg-reconfigure resolvconf and answer YES. – geekQ Mar 28 '13 at 9:17
This is a great method if you're going to do dpkg-reconfigure resolvconf --frontend=noninteractive followed up resolvconf -u. If you don't move the file and symlink first, an unattended dpkg-reconfigure will fail because /etc/resolv.conf is not a symlink. – Justin Force Feb 19 '14 at 21:17

Had since a loooong time problems with my laptop, had to

sudo dhclient wlan0 

to be able to make the web work. Found that the resolv.conf was not updated by the network manager, and finally the

sudo dpkg-reconfigure resolvconf

solved my problem!

share|improve this answer

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.