Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Anything that asks for something via localhost fails. I can't get any result from pinging localhost. The only way I can reach anything in my network would be to resort to connecting to my externalIP:port# and that will route myself back in. My host file seems to look ok... How can I fix this?

share|improve this question
Does it seem to look okay or is it okay? You post it here? Has it ever worked? Do you remember changing anything? – slhck May 17 '12 at 12:53
does ping work? – Kamil Klimek May 17 '12 at 15:17
well, it was where I could delete my preferences folder out of my system level Library and reboot and I could then ping and localhost successfully. now when I reboot doing the same I can only ping and localhost is still "ping: cannot resolve localhost: Unknown host" – Chris May 20 '12 at 3:37
also I tried deleting my hosts file to let the OS re create it and issue persists – Chris May 20 '12 at 3:37

Are you 100% sure your host file is correct?

If ping is giving you Unknown host that means it doesn't have that info on the host files or any thing to resolve to localhost being your computer.

Open a terminal window

Type in sudo pico /private/etc/hosts

Check if you have something like this       localhost broadcasthost
::1             localhost

If you don't have this lines (which you probably don't by the result of your ping) then your host file is not ok.

You need those lines, specially the first one to be able to resolve to localhost.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .