Home Technology Networking Easier method of Editing the hosts file on Mac OS X - without using Terminal

Tags: DNS Dynamic Name Service , Hosts File , Mac OS , Networking , Unix Administration

By Andrew B. Bartels, August 23, 2010


Here are some easier instructions for modifying the hosts file on Mac OS X.

Some folks have found it difficult to follow the original method which uses some command lines and Terminal.


Hopefully these alternate instructions are easier to follow:


You must be logged in under an administrator account!


1. In Finder, select the Go menu, then select the "GO to Folder" menu option.

2. Type /etc for the folder name, and click Go

3. Locate the hosts file, and COPY it to the desktop.

4. Edit the copy by double clicking the icon on the desktop.

5. Add a new line at the bottom that contains the IP address and the host name.

6. Save the changes.

7. Copy the desktop file back to the /etc folder in finder.

8. Press the button to Authenticate.

9. Press the button to Replace the file.

10. Enter your password.


The original article also suggests flushing the cache as the last step.  You might still need to do this step from the command line within Terminal.