Ubuntu cannot resolve host after modifying host name

Source: Internet
Author: User

Enter/etc directory or edit/etc/hosts file directly

The following are the contents of my Hosts file:

 127.0 . 0.1   localhost  127.0 . 1.1  wakasann-rev-0  # The following lines is desirable for   I PV6 capable hosts :: 1  ip6-localhost ip6- Loopback  fe00::0  ip6-localnet  Ff00::0  ip6-1  ip6-allnodes  ff02::2  ip6-< Span style= "color: #000000;" >allrouters  

Because I am in the settings, information, device name modified to: wakasann-rev-0

Each time sudo is displayed, it will appear once:

sudo: Unable to resolve host: wakasann-rev-0

Can see outside of 127.0.0.1 localhost, the second behavior of my host name,

1. The name of the device can be modified to the host name in the Hosts file "wakasann-rev-1-0" (I use this, modify the device name, need to log off once, and then log in, only valid)

2. You can change "wakasann-rev-1-0" to the device name I set "wakasann-rev-0"

Reference links are:[Ubuntu] sudo: Unable to resolve host issues

Ubuntu cannot resolve host after modifying host name

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.