Assuming you're asking how to find the file (it will most likely exist already):
In a Unix-like operating system (including Mac OS X and Linux), you'll typically find the hosts file in /etc/hosts. Note that Mac OS X does not by default show you the etc directory. You can show it in various ways, such as by choosing Go → Go to Folder… in Finder, and typing /etc.
In an NT-based operating system (including Windows XP and Windows Vista), the etc directory is slightly hidden, in %WINDIR%\system32\drivers\, e.g. C:\WINDOWS\system32\drivers\etc\hosts.
Hosts file on Linux/Unix:
Hosts file on Windows:
Assuming you're asking how to find the file (it will most likely exist already):
hosts
file in/etc/hosts
. Note that Mac OS X does not by default show you theetc
directory. You can show it in various ways, such as by choosing Go → Go to Folder… in Finder, and typing/etc
.etc
directory is slightly hidden, in%WINDIR%\system32\drivers\
, e.g.C:\WINDOWS\system32\drivers\etc\hosts
.