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