How to edit hosts file on OSX

Posted on August 21, 2014 by Michael Roma

Run this command to open the file to edit. You will need the administrator password:

sudo nano /private/etc/hosts

Then arrow down and add your entry to the file. To save, hit Control+X and it will prompt to save changes, enter "Y" to save.

comments powered by Disqus