The keywords dns and files can be used in the /etc/nsswitch.conf file to specify a source for host
name lookups. The keyword dns means that the system will use the Domain Name System (DNS) to
resolve host names to IP addresses. The keyword files means that the system will use the local
/etc/hosts file to resolve host names to IP addresses. The order of the keywords on the line
determines the order in which the sources will be queried. For example, the following line in
/etc/nsswitch.conf:
hosts: files dns
means that the system will first check the /etc/hosts file for a matching host name, and if not found,
it will query the DNS servers configured in /etc/resolv.conf. The other keywords in the question are
not valid for the hosts database. The keyword resolv is used for the services database, which contains
network service names and port numbers. The keyword remote is not a standard keyword, but it may
be used by some applications to implement their own name service providers. The keyword hosts is
the name of the database itself, not a source for it. Reference:
[LPI Linux Administrator - Exam 102 Objectives -