I don't know when to start using sudo. although unabletoresolvehostxxxx (XXXX is the host name) does not affect the sudo function, I feel uncomfortable every time I see sudo, then I found some information and killed it! Since it is a host
I don't know when to start. when sudo is used, unable to resolve host xxxx (XXXX is the host name) will appear)
This does not affect the sudo function, but every time we see sudo, we feel very uncomfortable. then we found some information and killed it!
Since it is a host issue, let's go to/etc/hosts to see
Input command: sudo vi/etc/hosts
Display
127.0.0.1 ubuntu # The following lines are desirable for IPv6 capable hosts .............. Omitted
The default host name here is ubuntu, but not our xxxx
I found the source of the problem here: I changed the host name, but the content of the/etc/hosts file was not changed.
Now that you know the reason, you can solve it! Change ubuntu to xxxx!