Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 need to add my own nameserver, but if I boot installation CD/DVD, I can't edit configuration files. So I'm searching for any way to add the nameserver from terminal.

share|improve this question
up vote 2 down vote accepted

You can add a name server by editing /etc/resolv.conf as root.

sudo vi /etc/resolv.conf

Add the line


Change to the IP address of your nameserver.

share|improve this answer
But isn't there any command to change it without editing the resolv.conf? – kravemir Nov 5 '11 at 12:58
Your distribution might have a helper script that updates nameservers but all it would do is edit resolv.conf. Is there a reason why you can't edit it directly? – Paul Nov 5 '11 at 13:37

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.