HOSTS file is used to resolve symbolic domain names (google.com)
to their corresponding IP addresses (173.194.112.98) and vice versa. That is, every time you enter the name of a site into the address bar of your browser, your computer, before connecting to it, must convert this “letter” name into the corresponding numbers.
The file has different locations on different operating systems:
Operating system Versions Location
Unix and Unix-like /etc/hosts
Windows 95, 98, Me %windir%\
NT, 2000, XP, 2003, Vista, 7, 8
%SystemRoot%\system32\drivers\etc\hosts,
its location can be overridden
in the registry key HKEY_LOCAL_MACHINE\SYSTEM\
CurrentControlSet\services\Tcpip\
Parameters\DataBasePath,
which contains the path to the folder.
Mac OS X and iOS All versions of Mac OS 10 /private/etc/hosts or /etc/hosts