Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

hosts file wont let me save.

Im currently trying to add to my hosts file (/Applications/TextEdit.app/Contents/MacOS/TextEdit /etc/hosts) and every time go press save is says i dont have permission to do that then says go to file>get info to change it but since im in text edit i cant. ive tried unlcking every thing but nothing seems to work. oh and im the admin and it still wont let me do it.

Anyone have any solutions, please?

MacBook Pro, Mac OS X (10.6.4)

Posted on Aug 27, 2010 3:20 PM

Reply
Question marked as Best reply

Posted on Aug 27, 2010 3:24 PM

Use TextWrangler to edit it and authenticate yourself.

(53506)
3 replies

Aug 27, 2010 3:30 PM in response to sethish17

Hi

You should not really edit the file in /etc with TextEdit. Besides you should try and back up the file first anyway. What you should use is a Terminal editor such as nano or pico or vi etc. Launch Terminal and issue:

sudo cp /etc/hosts /etc/host.bak


When prompted key in the local admin accounts password. You won't see it being typed so don't worry. That makes a copy of the hosts file just in case you screw things up. Next issue:

sudo nano /etc/hosts


Navigate using the arrow keys to a place where you can make your changes. It will be the line following the entry that looks a bit like this:

fe80::1%lo0 localhost


Control+O will write any changes you made. You'll be prompted to confirm the change. Press the enter key to confirm. When the change has been made Control+X will exit the editor. Quit Terminal when you're done.

Why do you need to edit the hosts file anyway? The interface is more than capable of handling DNS lookups.

Tony

hosts file wont let me save.

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.