Mac上简单的修改Hosts的方法

网上能搜到5-6种Mac系统下修改Hosts的方法,试验过了以后,觉得用Gasmask的方法最简单。安装以后会在LaunchPad中生成一个面具图标。打开后就能直观的编辑hosts文件,直观方便。目前最新的版本是0.5.1

修改完成保存的时候会提示需要管理员密码确认修改。

你还可以创建多个hosts文件,选择后点击Activate就能方便的将其变成当前生效的hosts文件。

懒人直接在文后下载,软件更新可以直接关注官网http://www.clockwise.ee/gasmask/

不过修改完后,再第二次补充host内容的时候,问题来了。粘贴进去的host ip没有生效。最后对比分析才知道,原来Windows中的txt文本内容Link breaks到Mac中要转成unix才行。

知道原因就好办,从Windows里或者是网上粘贴过来的内容,用Mac自带的文本编辑重新复制一遍即可。最后记得在终端命令窗口里运行命令刷新dns缓存,命令如下:
sudo dscacheutil -flushcache

如果想验证一下,host中的ip是否生效。
可以到实用工具---网路实用工具里ping一下host中包含的网址,看得到的ip地址时候一致。

很多Adobe注册失败的人估计都是这块出问题,以为已经加入了屏蔽的host ip,结果可能那些屏蔽根本没有起作用。

顺便贴上ip地址
改了以后,iTuneU的下载速度从提示需要23小时,变成了40分钟
当然,如果还要补充的话,到你的网络设置中添加一个DNS地址:178.79.131.110

速度飞快了的同学,要记得回来GOOD一下:)

##
# 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
127.0.0.1 practivate.adobe.com
127.0.0.1 activate.adobe.com
127.0.0.1 ereg.adobe.com
127.0.0.1 activate.wip3.adobe.com
127.0.0.1 wip3.adobe.com
127.0.0.1 3dns-3.adobe.com
127.0.0.1 3dns-2.adobe.com
127.0.0.1 adobe-dns.adobe.com
127.0.0.1 adobe-dns-2.adobe.com
127.0.0.1 adobe-dns-3.adobe.com
127.0.0.1 ereg.wip3.adobe.com
127.0.0.1 activate-sea.adobe.com
127.0.0.1 wwis-dubc1-vip60.adobe.com
127.0.0.1 activate-sjc0.adobe.com
127.0.0.1 adobe.activate.com
127.0.0.1 ood.opsource.net
127.0.0.1 adobeereg.com
127.0.0.1 hl2rcv.adobe.com
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost
202.175.5.121 adcdownload.apple.com
202.175.5.121 deimos3.apple.com
202.175.5.121 appldnld.apple.com
202.175.5.121 swcdn.apple.com
202.175.5.121 developer.apple.com
199.59.149.210 t.co
199.59.149.243 upload.twitter.com
199.59.149.243 pic.twitter.com
199.59.149.243 oauth.twitter.com
199.59.149.243 twitter.com
199.59.149.243 www.twitter.com
199.59.149.243 mobile.twitter.com
199.59.149.243 api.twitter.com
199.59.149.243 search.twitter.com
199.59.148.139 userstream.twitter.com
199.59.149.243 ssl.twitter.com
199.59.149.243 status.twitter.com
199.59.149.243 assets0.twitter.com
199.59.149.243 assets1.twitter.com
199.59.149.243 assets2.twitter.com
199.59.149.243 assets3.twitter.com
199.59.149.243 static.twitter.com
184.29.36.124 platform.twitter.com
219.76.10.138 platform0.twitter.com
199.59.148.206 help.twitter.com
199.59.148.206 support.twitter.com
184.28.97.55 p.twimg.com
184.169.75.33 si0.twimg.com
184.169.75.33 si1.twimg.com
184.169.75.33 si2.twimg.com
184.169.75.33 si3.twimg.com
184.169.75.33 si4.twimg.com
184.169.75.33 si5.twimg.com
199.59.148.243 scribe.twitter.com
199.59.148.138 betastream.twitter.com
184.106.20.99 posterous.com
209.17.70.144 oi40.tinypic.com
209.17.70.143 oi41.tinypic.com
209.17.70.143 oi42.tinypic.com
209.17.70.143 oi43.tinypic.com
209.17.70.143 oi44.tinypic.com
209.17.70.143 oi45.tinypic.com
209.17.70.143 oi46.tinypic.com
209.17.70.143 oi47.tinypic.com
209.17.70.143 oi48.tinypic.com
209.17.70.143 oi49.tinypic.com
209.17.70.143 oi50.tinypic.com
209.17.70.144 oi51.tinypic.com
209.17.70.144 oi52.tinypic.com
209.17.70.144 oi53.tinypic.com
209.17.70.144 oi54.tinypic.com
209.17.70.144 oi55.tinypic.com
209.17.70.144 oi56.tinypic.com
174.36.58.234 twitpic.com
174.36.58.234 www.twitpic.com
174.36.46.32 web7.twitpic.com
174.36.58.204 web1.twitpic.com
174.36.58.224 web2.twitpic.com
174.36.58.200 web3.twitpic.com
174.37.33.184 web4.twitpic.com
174.37.75.16 web5.twitpic.com
174.36.35.60 web6.twitpic.com
66.228.120.92 web8.twitpic.com
74.86.100.160 web9.twitpic.com
74.86.87.236 web10.twitpic.com
69.58.188.34 bitly.com
208.94.0.61 a.yfrog.com
208.94.0.61 yfrog.com
208.94.0.61 www.yfrog.com
199.59.149.208 scribe.twitter.com
208.87.33.151 api.mobilepicture.com
66.220.149.25 facebook.com
66.220.149.25 www.facebook.com
69.171.229.32 m.facebook.com
66.220.146.28 login.facebook.com
69.63.179.70 secure.facebook.com
69.171.242.28 apps.facebook.com
69.63.181.31 touch.facebook.com
118.214.114.110 s-static.ak.facebook.com
66.220.147.47 api.facebook.com
66.220.149.25 zh-CN.facebook.com
61.213.189.98 static.ak.facebook.com
61.213.189.98 b.static.ak.facebook.com
69.63.181.57 secure-profile.facebook.com
69.63.181.57 secure-media-sf2p.facebook.com
69.63.181.15 ssl.facebook.com
69.63.190.18 apps.facebook.com
118.214.190.105 profile.ak.facebook.com
61.213.189.113 fbcdn.net
97.65.135.139 external.ak.fbcdn.net
120.29.145.50 vthumb.ak.fbcdn.net
97.65.135.163 static.ak.fbcdn.net
66.220.149.25 graph.facebook.com
61.213.189.120 b.static.ak.fbcdn.net
61.213.189.113 creative.ak.fbcdn.net
61.213.189.114 profile.ak.fbcdn.net
61.213.189.113 s-hprofile-sf2p.fbcdn.net
61.213.189.113 photos-a.ak.fbcdn.net
61.213.189.113 photos-b.ak.fbcdn.net
61.213.189.113 photos-c.ak.fbcdn.net
61.213.189.113 photos-d.ak.fbcdn.net
61.213.189.113 photos-e.ak.fbcdn.net
61.213.189.98 photos-f.ak.fbcdn.net
61.213.189.113 photos-g.ak.fbcdn.net
61.213.189.113 photos-h.ak.fbcdn.net
69.63.180.51 upload.facebook.com
64.213.102.26 fbcdn-profile-a.akamaihd.net

2 thoughts on “Mac上简单的修改Hosts的方法

Comments are closed.