Just started using Mac yesterday suddenly appeared hostname was changed to Bogon
Find some ways to surf the internet
Record it down:
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)
sudo hostname your-desired-host-----set hostname $ (hostname)
Demo
----set HostName $ (HostName) terminal display Llqfront:
The mysterious Bogon and solution in MAC terminal