Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying to edit my hosts file on a Mac Tiger OS. When trying to edit the file I get the following output and I'm unable to save any changes.

"hosts" [readonly] 14L, 330C`

How can I fix this?

share|improve this question
add comment

1 Answer

In Unix-like operating systems, you need to be root to edit the hosts file. This is controlled by file ownership and permissions.

You can change file permissions (if you own the file, or are root) and give everyone permission to write to the file using chmod o+w filename - But you shouldn't do this for the hosts file for security reasons.

I believe Mac OSX has sudo, you should use that. sudo editor filename (e.g. sudo vi /etc/hosts)

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.