Editing your mac's Hosts file

If you can not edit your hosts file located in "private/etc" directory, it's because;

The whole directory has "admin" permissions, and your text editor maybe running with your current user permissions. You can either move the Hosts file to desktop and edit it, and put it back, or use Terminal and edit the file.

Open Terminal.

Type cd /etc

Type sudo nano hosts

Type your password

Edit File

Hit Ctrl + O to save

Hit Ctrl + X to quit

Comments

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.