Ping cannot resolve, unknown host

When you are used to play with systems, it's so strange if you add a new entry in your /etc/hosts file and then the computer is not able to resolve the host. Sometimes it could be due to a typo, wrong ip address, typo writting the fqdn... If you mix OSX in the cocktail there are many other factors that can affect to the malfunction (multiple domains per line, resolution order, read more).

But when you are really sure that all is in right place, you are not drunk and your sight is ok, you have to resort to thesuperhero-command-line. As sysadmin, you have nothing to envy to Superman, of course you can see between walls too:

# cat -vet /etc/hosts
192.168.0.10   pc1$
192.168.0.11   pc2$
192.168.0.12   pc3$
192.168.0.13�M-^@�  thefuck$
192.168.0.14   pc20$
192.168.0.15   pc21$

Now you are ready to move next level: learn the power to fly above your lusers.

sysadmin

About the author

Óscar
has doubledaddy super powers, father of Hugo and Nico, husband of Marta, *nix user, Djangonaut and open source passionate.