Vannkorn

Full Stack Web Developer

Close

Fix: sudo: unable to resolve host

When using VestaCP you sometimes meet this issue.

Ads: Register now via this link to receive $100 credit from Vultr

This is happens when we pick the name of fqdn when firstly install Vesta and the name is different from the domain we bought. Then whenever we run the command sudo, we will get such error message.

To avoid showing this annoying message, we need to remove this registered fqdn by going to the /etc and edit the hostname file. Then paste in the following configuration:

127.0.0.1   localhost
127.0.1.1   your-fqdn.sth

Then restart the apache2 service by running this command: sudo service apache2 reload

Leave a Reply

Your email address will not be published. Required fields are marked *