如何修改host文件,搭梯子去国外?
2017-07-31 本文已影响493人
简书超级会员
1.首先在命令行敲下面的命令,用vim打开host文件;

2.打开后默认的就长这个样子;
##
# 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
3如何修改权限 shift+command+G
输入/private/etc/hosts

4如何修改权限 打开右下角的🔒,修改为Read&write

在这里有一种修改host文件的方法,搭梯子去国外...有兴趣的私聊我
Mac检查端口是否占用
lsof -iTCP:80 | grep LISTEN
If you are going to find the process listening on 80 port
sudo lsof -i -P | grep -i "listen"
Mac下使用这个命令即可查看所有占用的端口