Recommended Posts

On Mac OS X Snow Leopard and below I used to be able to access the Hosts file using this command:

sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit /etc/hosts

However, after installing Mac OS X Lion today I can't anymore. Any suggestions how to open and edit the file? Thanks in advance.

Link to comment
https://www.neowin.net/forum/topic/1013632-access-hosts-file-mac-os-x-lion/
Share on other sites

  On 21/07/2011 at 01:18, .Neo said:

On Mac OS X Snow Leopard and below I used to be able to access the Hosts file using this command:

sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit /etc/hosts

However, after installing Mac OS X Lion today I can't anymore. Any suggestions how to open and edit the file? Thanks in advance.

I always just use TextWrangler to edit it. Sudo worked for me though (not using TextEdit.app).

  On 21/07/2011 at 19:40, Xtreme $niper said:

Still doesn't really explain why he can't use TextMate to edit the file anymore...?

TextEdit, not TextMate. You can still use TextMate just fine. The problem probably has something to do with sandboxing in Lion.

  • 4 months later...

There's an application called Gas Mask that can edit the Hosts file on the Mac quiet easily - even allow for subscriptions to anti-malware and adblock Hosts files from this site: http://winhelp2002.mvps.org/hosts.htm.

Gas Mask is available here http://www.clockwise.ee/gasmask - it also has a Google Code page here: http://code.google.com/p/gmask/

  On 29/11/2011 at 16:40, allan.nyholm said:

There's an application called Gas Mask that can edit the Hosts file on the Mac quiet easily - even allow for subscriptions to anti-malware and adblock Hosts files from this site: http://winhelp2002.mvps.org/hosts.htm.

Gas Mask is available here http://www.clockwise.ee/gasmask - it also has a Google Code page here: http://code.google.com/p/gmask/

I've just realized that I 'double recommended' the Gas Mask application. An oversight on my part.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.