Names and DNS
Hosts file
A local list of names and addresses, consulted before DNS on most systems.
The hosts file (/etc/hosts) is a local list of names and their addresses that a machine reads before it asks DNS. The line hosts: files dns in /etc/nsswitch.conf sets that order. Programs follow it; dig does not, because it
asks DNS directly. getent hosts name shows the address programs really get.