Apple Event: May 7th at 7 am PT

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

What is the difference between private/etc/hosts and etc/hosts?

I was attempting to modify my iMac 'hosts' file in terminal and tried the usual sudo nano /private/etc/hosts. It would bring up an empty page. I thought the hosts file was simply empty. I added the entries I wanted to block and when I tried to exit and save (^o or ^x and choosing yes), i would get the error '/private/etc/hosts: No file exists' (or something to that effect).

After some researching, I tried using 'sudo nano /etc/hosts' and it brought up what looks like the hosts file (It has the same entries as I have on my MBP running the same OS when I sudo nano /private/etc/hosts)

Is there a difference in the file in /private/etc/hosts and /etc/hosts ?
Does that mean I have a problem with my iMacs' host file?

iMac, Mac OS X (10.6.8)

Posted on Feb 20, 2013 5:38 AM

Reply
20 replies

What is the difference between private/etc/hosts and etc/hosts?

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