您的位置:首页 > 编程语言 > Go语言

Solution to the problem of machine name becomes "bogon" in Mac

2015-07-01 11:31 405 查看
Virtual DNS is the reason caused this problem.
What is the meaning of "bogon"? "bogon" means the type of IP addresses that should not appear in a traceroute, like a reserved IP address. The DNS server can give your machine a host
name, this function should be turned off for public DNS servers. Since the machine uses a router, so it has a IP like 192.168.0.x in LAN, this IP will be sent to the DNS server for a reverse lookup, and since it is a reserved IP address, the DNS server returns
a hostname as, thus, changes the machine's hostname.
Solution:
1 sudo hostname your-desired-host-name
2 sudo scutil --set LocalHostName $(hostname)
3 sudo scutil --set HostName $(hostname)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  Mac bogon terminal