请问有没有用过 manjaro 的?问一下修改 hosts 文件的事。

2018-01-30 09:22:21 +08:00
 Tidycc

问题:修改 hosts 文件之后怎么生效?

之前都是用修改 hosts 文件的方式来访问 google,然后在 manjaro 上修改之后,一直无效(即无法访问 google )。 查了下网上都是说直接修改 hosts 文件就可以了 我想请问这如何解决?是不是还需要配置什么?

4731 次点击
所在节点    Linux
11 条回复
xfspace
2018-01-30 09:27:44 +08:00
你需要配置国籍
Humorce
2018-01-30 09:44:54 +08:00
不需要,没生效,重启一次也肯定会生效
如果是用 windows 下的 hosts file 覆盖的话,当我没说
lingyv
2018-01-30 09:47:59 +08:00
是自己手动改的?我没遇到这个问题,要不重启大法试试?
Oo0
2018-01-30 09:54:03 +08:00
现在修改 host 基本上没用了,ipv4 的 IP 基本上死绝了
princelai
2018-01-30 10:21:30 +08:00
未修改

☁ ~ ping -c 5 google.com
PING google.com (216.58.200.46) 56(84) bytes of data.

--- google.com ping statistics ---
5 packets transmitted, 0 received, 100% packet loss, time 4059ms


修改后

☁ ~ ping -c 5 www.google.com
PING www.google.com (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.039 ms
64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.044 ms
64 bytes from localhost (127.0.0.1): icmp_seq=3 ttl=64 time=0.045 ms
64 bytes from localhost (127.0.0.1): icmp_seq=4 ttl=64 time=0.027 ms
64 bytes from localhost (127.0.0.1): icmp_seq=5 ttl=64 time=0.045 ms


查看

☁ ~ getent hosts
127.0.0.1 localhost
127.0.1.1 Solarck
127.0.0.1 localhost ip6-localhost ip6-loopback
127.0.0.1 www.google.com


另外还是 ss 好用,别修改 hosts 了
lulinux
2018-01-30 10:26:13 +08:00
何必折腾。买个阿里云 hk 服务器,800 元管 3 年自己随便用。没钱就用花呗垫着。设定非 22 端口之后 fq 不会有卡顿。
dizzy
2018-01-30 10:53:54 +08:00
@lulinux 现在阿里云的香港节点还能买吗?我记得之前得要香港的电话和信用卡之类的.
lulinux
2018-01-30 11:52:00 +08:00
loading
2018-01-30 13:49:21 +08:00
按 archlinux 就行
Tink
2018-01-30 18:12:07 +08:00
换 hosts 不好用吧
Tidycc
2018-02-01 09:17:00 +08:00
@lingyv 重启了也没用

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/426985

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX