Edit DNS Configuration Files

by on February 16, 2008 · 3 comments· LAST UPDATED November 16, 2008

in , ,

Q. How do I edit dns configuration file to add my ISPs nameservers?

A. You need to edit /etc/resolv.conf file to set nameserver. Name server IP address Internet address (in dot notation) of a name server that the resolver should query. Up to 3 name servers may be listed, one per keyword. If there are multiple servers, the resolver library queries them in the order listed. If no nameserver entries are present, the default is to use the name server on the local machine.

Edit /etc/resolv.conf using a text editor such as vi or nano or gedit:
# vi /etc/resolv.conf
Appnd namesever as follows:

Save and close the file. The algorithm used is to try a name server, and if the query times out, try the next, until out of name servers, then repeat trying all the name servers until a maximum number of retries are made.

Tweet itFacebook itG+ itDownload PDF versionFound an error/typo on this page?

{ 3 comments… read them below or add one }

1 ndjock-abanda arthur March 5, 2009 at 1:44 pm

this algorithm implements the recursive mode, how an DNS should work!
but is there a possibility to implement a non-recursive mode for the DNS ?


2 ashish February 26, 2010 at 10:01 am

hello sir
plz tell me
i have one computer and i have to configure dns server so how to configure dns server in linux.


3 Salim January 2, 2015 at 9:44 am

To create duplicate ip
#ifconfig eth0:1 netmask


Leave a Comment

Tagged as: , , , , , , , , , ,

Previous Faq:

Next Faq: