Unable to Resolve Host IP

Posted on Thursday, December 20, 2012

Unable to Resolve Host IP

Every so often I get this error from the command line from ubuntu 12.04 LTS in the Amazon AWS cloud.

unable to resolve host ip-XX-X-XX-XXX

Get the machine name, run this command

      > hostname

I get ip-10-0-11-227

Update the /etc/hosts file

      >  sudo vi /etc/hosts

And add this line to the end of the file ip-10-0-11-227

And save it

That should fix it.



  1. Real fix is : http://serverfault.com/questions/315560/unable-to-resolve-host-error-whenever-running-a-command-with-sudo-on-ubuntu-we/598108#598108