A text file on a networked computer used to associate host names with IP addresses. A hosts file contains lines consisting of whitespace-separated fields giving an IP address followed by list of host names or aliases associated with that address. The name resolution library software can use this file to look up the IP address for a host name. The hosts file is "/etc/hosts" on Unix and "C:\Windows\System32\drivers\etc\hosts" or "lmhosts" on Microsoft Windows,
In most cases, hosts files have now been almost entirely replaced by DNS, in which distributed servers provide the same information. A hosts file can still be used to override DNS for testing purposes or other special situations.