Mysterious Bogon and solutions in MacOS terminal

Source: Internet
Author: User
Tags administrator password

Title, at the end of a Mac, sometimes the computer name in front of you is incorrectly displayed as Bogon. This is because the terminal will first query DNS requests for the results of the reverse domain name resolution of the current IP, and if the query does not display the computer name that we set. And because our DNS incorrectly returns the NS query result of the reserved address reversal to Bogon. Where Bogon should be used to refer to a false IP address rather than a reserved IP address. As a result, there is a phenomenon that occasionally prints Bogon's strange name as a computer name. So how do we let the terminal show only the computer name we want and not always return the results from DNS?

Solution:
Execute the following command in the terminal (you need to enter the Administrator password once)

1 sudo hostname your-desired-host-name2sudo scutil--set localhostname $ (hostname  )3sudo scutil--set HostName $ (HostName)

Mysterious Bogon and solutions in MacOS terminal

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.