How to resolve “sudo: unable to resolve host”

This error is because the name of this machine is not recognized.

You have the name of the machine in the file /etc/hostname. You can edit that machine name with the command:

sudo vim /etc/hostname

The point is that “myhost” should appear there (or whatever it puts after “unable to resolve host”. Well, there must be an entry with that value in the hosts file for the localhost IP. Edit that file:

sudo vim /etc/hosts

You add the line:

127.0.1.1 myhost

With that, the problem would be fixed. You can try doing sudo:

sudo su

See also  https://developmentweb.com/home/git
Loading Facebook Comments ...
Loading Disqus Comments ...