mac:/private/tec/hosts
原始内容
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
修改,添加机器名.local
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost 你的机器名.local
255.255.255.255 broadcasthost
::1 localhost 你的机器名.local
获取机器名方式
打开终端,输入:hostname