GithubHelp home page GithubHelp logo

sammuelyee / hosts Goto Github PK

View Code? Open in Web Editor NEW

This project forked from stay-sharp/hosts_for_google_service

0.0 2.0 0.0 1.26 MB

:statue_of_liberty:最新可用的google hosts文件

Python 14.39% QMake 4.13% C++ 69.75% Shell 4.48% Batchfile 7.25%

hosts's Introduction

已证实火星上存在液态水啦!!

更多内容请访问hosts wiki

Windows

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

GNU/Linux

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

修改hosts后生效的方法

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

  • Linux
    终端输入sudo rcnscd restart
    (对于systemd发行版,请使用命令sudo systemctl restart NetworkManager。如果不懂请都尝试下)

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

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

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

Others

  • 可使用getHosts.py进行跨平台的hosts简单配置,简单示例如下
import getHosts
h = getHosts.hosts()
h.printContributors() #输出hosts贡献者名单
h.getReadMeFile()     #获取README.MD文件
h.getHostsFile()      #获取hosts文件
                      #更多功能亟待补充

hosts's People

Contributors

andytimes avatar chaosshen avatar cw881014 avatar fluviusmagnus avatar k-guan avatar lyrictian avatar rellyvadd avatar smounives avatar timothygu avatar whiteclover avatar y1yang0 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.