The following files contain important information about your system’s network configuration:
This file contains simple mappings between IP addresses and names and is used for name resolution. For very small private networks, /etc/hosts may be sufficient for basic name resolution. For example, this file associates the local address 192.168.1.30 with the system smp and also with smp.mydomain.com:
127.0.0.1 localhost localhost.localdomain 192.168.1.1 gate 192.168.1.30 smp smp.mydomain.com
This file controls the sources used by various system library lookup functions, such as name resolution. It allows the administrator to configure the use of traditional local files (/etc/hosts, /etc/passwd), an NIS server, or DNS. nsswitch.conf directly affects network configuration (among other things) by controlling how hostnames and other network parameters are resolved. For example, this fragment shows that local files are used for password, shadow password, group, and hostname resolution; for hostnames, DNS is used if a search of local files doesn’t yield a result:
passwd: files nisplus nis shadow: files nisplus nis group: files nisplus nis hosts: files dns nisplus nis
For more information, view the manpage with man 5 nsswitch. The nsswitch.conf file supersedes host.conf. In the majority of setups, this file does not need to be modified, as the defaults are usually sufficient.
This file controls name resolution sources for pre-glibc2 systems. ...