Super User is a question and answer site for computer enthusiasts and power users. 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 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

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 Feb 13 '13 at 9:54

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

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:

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .