美文网首页
如何修改host文件,搭梯子去国外?

如何修改host文件,搭梯子去国外?

作者: 简书超级会员 | 来源:发表于2017-07-31 22:54 被阅读493次
1.首先在命令行敲下面的命令,用vim打开host文件;
WX20170731-224741@2x.png
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
QQ20170803-110506.png
4如何修改权限 打开右下角的🔒,修改为Read&write
QQ20170803-110818.png
在这里有一种修改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下使用这个命令即可查看所有占用的端口

相关文章

网友评论

      本文标题:如何修改host文件,搭梯子去国外?

      本文链接:https://www.haomeiwen.com/subject/ihrdlxtx.html