Sudo's solution to unabletoresolvehostxxxx

Source: Internet
Author: User
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!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.