如何在 Mac 上编辑 Hosts 文件

我叫伊藤,是一名基础设施工程师。
如何在Mac上编辑Hosts文件。
# sudo vi /private/etc/hosts
以下是默认的 hosts 文件:
## # 主机数据库 # # localhost 用于在系统启动时配置环回接口。请勿更改此条目。 ## 127.0.0.1 localhost 255.255.255.255 broadcasthost ::1 localhost
请以相同格式将其添加到底部。
127.0.0.1 test.org
我会去看看。
MacBook-Air:~ ito$ ping test.org PING test.org (127.0.0.1): 56 字节数据 来自 127.0.0.1 的 64 字节:icmp_seq=0 ttl=64 time=0.070 ms 来自 127.0.0.1 的 64 字节:icmp_seq=1 ttl=64 time=0.193 ms
设置正确!
如果您觉得这篇文章有帮助,请点赞!
0