Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Jarl

macrumors newbie
Original poster
Aug 13, 2011
2
0
Hi,

I'm using OS X Lion 10.7 and I want to edit my host file using the following terminal command:

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

I'm logged in as administrator and I enabled the root user.
Still after entering my password I get this error message:

"TextEdit[603:7907] PersistentUI: LSSharedFileListInsertItemURL() failed at inserting URL file://localhost/etc/hosts"

What am I doing wrong?
 
Try just running

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

Then open the file by using File -> Open.
 
try buying CS5 then you won't need to edit the file :D

Plenty or legitimate reasons to edit your hosts file; it's the easiest way to block known web advertisers, and it can solve some networking problems with multiple OSes, where name resolution does not always work as intended.
 
and how can I save the file? CMD+S doesn't work
or which location do i need to select?

thanks in advance
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.