将下面的内容保存至/private/etc/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 fe80::1%lo0 localhost
如果你需要修改hosts文件可以参考:macOS修改hosts的3种方法