This project is read-only.

 Hosts file 



The hosts file is one of several system facilities to assist in addressing network nodes in a computer network. It is a common part in an operating system's Internet Protocol (IP) implementation, and serves the function of translating human-friendly hostnames into numeric protocol addresses, called IP addresses, that identify and locate a host in an IP network.

In some operating systems, the hosts file content is used preferentially over other methods, such as the Domain Name System (DNS), but many systems implement name service switches (e.g., nsswitch.conf) to provide customization. Unlike the DNS, the hosts file is under the direct control of the local computer's administrator.

Location in the file system

The location of the hosts file in the file system hierarchy of operating systems varies. The hosts file is usually named "hosts" without any .txt extension.

Operating System Version(s) Location
UnixUnix-like,POSIX   /etc/hosts[2]
Microsoft Windows 3.1 %Windir%\HOSTS.SAM
9598/98SEMe %WinDir%\hosts[3]
NT2000, and 32-bit versions ofXP,[4] 2003Vista7 %SystemRoot%\system32\drivers\etc\hosts[5]
64-bit versions[5] %SystemRoot%\system32\drivers\etc\hosts (Many sources, including several Microsoft support pages, will incorrectly state that the hosts file is at %SystemRoot%\SysWOW64\drivers\etc\hosts)[6]
Windows Mobile   Registry key under \HKEY_LOCAL_MACHINE\Comm\Tcpip\Hosts
AppleMacintosh 9 and earlier System Folder: Preferences or System folder
Mac OS X 10.0 – 10.1.5 [7] (Added through NetInfo or niload)
Mac OS X 10.2 and newer /private/etc/hosts [7] (or /etc/hosts, since /etc is a symbolic link to /private/etc)
Novell NetWare   SYS:etc\hosts
OS/2 &eComStation   "bootdrive":\mptn\etc\
Symbian Symbian OS 6.1–9.0 C:\system\data\hosts
Symbian OS 9.1+ C:\private\10000882\hosts
MorphOS NetStack ENVARC:sys/net/hosts
Android   /system/etc/hosts (or /etc/hosts, since /etc is a symbolic link to /system/etc)
iOS (only with jailbreak) iOS 2.0 and newer /etc/hosts

Last edited Sep 17, 2011 at 2:51 PM by shootsoft, version 2


No comments yet.