Files/Etc/Resolv.conf

From Wsms

Jump to: navigation, search

Note: This page should be titled reslov.conf (all lowercase). It is titled Resolv.conf due to a technical limitation of Mediawiki.

/etc/resolv.conf tells your linux system which name servers to use. It can also have a line like:

order hosts, bind

which tells makes the system look first in the hosts file, then use dns.

Here is a sample /etc/resolv.conf file:

search sdlinuxguy.com
nameserver 69.17.112.40
nameserver 64.81.45.2
nameserver 216.231.41.2

The first line means that if no domain is specified, the name resolver will look for a host in the sdlinuxguy.com domain. The IP addresses for name servers come next.

see also

dig
nslookup
man resolv.conf

the file: /etc/nsswitch.conf

Personal tools