Where in the world is /etc/hosts

I am to add some host entries to the »hosts« file, but can't find the etc-catalogue. Unix-fiddling is not my best subject 😉
Can you direct me where to find /etc/hosts?

MacBook Pro 15/2.4 + PowerBook G4 15/1.5, Mac OS X (10.5.1)

Posted on Mar 17, 2008 4:01 AM

Reply
2 replies

Mar 17, 2008 5:38 AM in response to tkoc

/etc/hosts is at... umm.. /etc/hosts... that is, the 'hosts' file in the /etc directory.

Your problem may be that the Finder hides the /etc directory by default - most users have little or no need to bother with it. You can, however, get there using the Finder's Go -> Go to Folder menu option and entering '/etc' as the path.

Note, though, that the files within /etc are protected and you won't be able to edit them as a regular user. You may need to use the terminal and use something like sudo to elevate your privileges so that you can edit the file.

Mar 17, 2008 3:00 PM in response to Camelot

Thx Camelot,
I knew where to find "hosts", and at the same time not. It was really as easy as using Finder's Go. I just wrote "etc" in the search field, and there it was.
The editing of the "hosts" document went as easy.

Couldn't have done it without you. Whenever in Stockholm, I'll buy you lunch.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Where in the world is /etc/hosts

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