To edit the Hosts file in Mac OS X:
- Launch Finder
- In the Finder menu bar (at the top of the screen when you’ve got Finder selected), click Go -> Go to Folder
- Type /private/etc/hosts and click Go
- Copy the hosts file from the folder to your desktop (or other location)
- Edit the copy of the hosts file as you want
- Copy the edited hosts file back to the original location
- Enter the administrative username / password for the Mac
You have successfully edited the hosts file on your Mac OS X. That’s all folks!