This weekend I spent some time moving my Classic EC2 instances to VPC, changing their zones to keep the redundant etc… After that, I was getting a very annoying message every time that I used the “sudo” command.
unable to resolve host xxx.xxx.xxx.xxx
I solved it just adding my new hostname to the hosts files. In a trick way you can do that just running the following command:
echo "127.0.0.1 $(hostname)" >> /etc/hosts