03 May 2012

Set DNS name server on Ubuntu 12.04 LTS

If you wish to change the dns nameserver information in ubuntu 12.04, you have to use the file /etc/network/interfaces instead of /etc/resolv.conf.

Edit /etc/network/interfaces and append or replace the following line to set your dns server :
And optionally this one to specify the domain to be append when you request a non fully qualify name :
dns-search foo.org bar.com


1 comment:

Michael Mior said...

Alternatively, you can add the following to /etc/dhcp/dhclient.conf

prepend domain-name-servers,;