which file will be queried first for hostname lookups ?

Given the following line from /etc/nsswitch.conf:
hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
By default, which file will be queried first for hostname lookups ?

(Provide the full path and filename)

Given the following line from /etc/nsswitch.conf:
hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
By default, which file will be queried first for hostname lookups ?

(Provide the full path and filename)

Answer: /etc/hosts

Explanation/Reference:
Database "hosts" defines the lookup sequence for DNS related services, and the entries are done in order of "files", "mdns4_minimal", "dns", "mdns4". "files" specifies the local DNS resolver file, which is /etc/hosts.



Leave a Reply 0

Your email address will not be published. Required fields are marked *