Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm running Ubuntu 12.04 and I managed to stomp on my /etc/resolv.conf file. I believe this is the cause of me getting

ping: unknown host www.google.com

It says resolv.conf is auto generated but I cannot figure out how to regenerate this file back to its previous default settings. I've checked many forums and the man files and I am stuck.

Appreciate any help.

share|improve this question

migrated from stackoverflow.com Feb 13 '13 at 9:54

This question came from our site for professional and enthusiast programmers.

2 Answers 2

up vote 0 down vote accepted

The resolv.conf file is, in case of ubuntu, generated by the NetworkManager. Disabling the adapter and re-enabling it afterwards should refresh the resolv.conf as NetworkManager fetches the informations via DHCP.

However, this is question is not suited for stackoverflow, as it has nothing to do with programming or some software framework or the like. You might have gone to the ubuntu stack exchange thingy: http://askubuntu.com/.

share|improve this answer

You could reinstall resolvconf to restore the default configuration:

 sudo apt-get install --reinstall resolvconf 

Another idea would be remove "resolvconf" and then install:

sudo apt-get remove --purge resolvconf && sudo apt-get install resolvconf 
share|improve this answer

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.