The mysterious bogon in the Mac terminal and the mysterious bogon in the Mac Terminal
Originally, the terminal displays the computer name. The result is "bogon" in the past two days. It is virtual and hypocritical to look up the word "bogon. Then, if it turns out that the DNS server will first query the direction resolution result of the local ip address. If the query fails, the computer name will be displayed. Because our DNS incorrectly returns the NS query result with the reserved address reversed to bogon, bogon should be used to refer to the fake IP address instead of the reserved IP address. Therefore, the strange name bogon may be printed as a computer name from time to time. So how can I make the terminal show only the computer name we want, instead of always returning results from DNS?
There are two methods:
1. Set DNS to Google's DNS server address 8.8.8.8
2. Configure on the terminal
Sudo hostname your-desired-host-name
Sudo scutil -- set LocalHostName $ (hostname)
Sudo scutil -- set HostName $ (hostname)