Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

wikieden/hosts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

161 Commits

Repository files navigation

更多内容请访问hosts wiki

Windows

  • 用文本编辑器(如Notepad++|记事本)打开C:\Windows\System32\drivers\etc中的hosts文件,
    把 -> hosts <- 全部内容复制到hosts文件中,保存后按下述方法令其生效。
    注意:如果遇到无法保存,请右键hosts->属性->安全,然后选择你登陆的用户名,最后点击编辑,勾选"写入"即可。

GNU/Linux

  • Linux 系统终端下命令:
    使用wget或curl,以wget为例:
    开启终端(快捷键为"Ctrl + Alt + T")输入wget https://raw.githubusercontent.com/racaljk/hosts/master/hosts_tool/script_tool_for_linux.sh -O - | sudo bash -
    按下述方法令其生效

修改hosts后生效的方法

  • Windows
    开始 -> 运行 -> 输入cmd -> 在CMD窗口输入ipconfig /flushdns

  • Linux
    终端输入sudo systemctl restart NetworkManager
    非systemd发行版,终端输入sudo rcnscd restart

  • Mac OS X
    终端输入sudo killall -HUP mDNSResponder

  • Android
    开启飞行模式 -> 关闭飞行模式

  • 通用方法
    拔网线(断网) -> 插网线(重新连接网络)

其它

  • 可使用getHosts.py进行跨平台hosts相关操作,简单示例如下
import getHosts
h = getHosts.hosts()
h.printContributors() #输出hosts贡献者名单
h.getReadMeFile() #获取README.MD文件
h.getHostsFile() #获取hosts文件
h.reportIssue(usrname='github username',password='github password',\
			title='issue title',body='issue content')
 		 #快捷创建Issue
 #更多功能亟待补充

Copyright © 2014-2015 racaljk, All Rights Reserved.

About

🗽最新可用的google hosts文件

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

Contributors

Languages

  • Python 60.1%
  • C++ 32.5%
  • Batchfile 3.4%
  • Shell 2.1%
  • QMake 1.9%

AltStyle によって変換されたページ (->オリジナル) /