Mac Host File
The most popular reason to edit a host file is to test virtual host configurations.
In order to edit and modify the mac host file you must edit it using terminal. This is where the file is located.
/private/etc/hosts
In order to edit it open up terminal and enter the following command:
# sudo pico /private/etc/hosts
You may have to enter your user password. Pico will open up and you should see the following:
Simply edit your entries and save. You will need to flush your DNS cache as well.
# dscacheutil -flushcache
This post assumes that you know what to do with the hosts file.
Read Also:
- Monitor your server using your iPhone and iStat Server
- using a host file to test a virtual host apache site configuration
- How to SSH without typing in a Password
Tags: Apple
