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.

When I edit /etc/resolv.conf, it is overwritten right away with the old configuration. How do I really change the nameserver on Ubuntu Server 9.10?

share|improve this question

1 Answer 1

up vote 4 down vote accepted

Here is how I do it:

  1. Backup your resolv.conf

    sudo cp /etc/resolv.conf /etc/resolv.conf.auto
    
  2. Edit /etc/dhcp3/dhclient.conf:

    sudo gedit /etc/dhcp3/dhclient.conf
    
  3. If there are any nameservers, write them down for future reference.

  4. Replace the reference line, or add:

    prepend domain-name-servers 1.2.3.4,4.3.2.1;
    
  5. Save and exit!

  6. Restart any Internet clients and services

  7. Test your new settings.

This should work in 9.10 just fine.

share|improve this answer
    
You even knew the DNS server I wanted! Thanks, it worked –  Jeffrey Aylesworth Feb 22 '10 at 18:16
5  
that's amazing! that's the same combination i have on my luggage! –  quack quixote Feb 22 '10 at 21:49
    
Why did you edit out a working DNS server, for one that doesn't exist? –  Jeffrey Aylesworth Feb 24 '10 at 21:06
    
Me? Well I'd figure you already had your own in mind :-\ –  Urda Feb 24 '10 at 21:51

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.