瀏覽代碼

添加自动更新One-liner

pull/116/head
West Xu 2 年之前
committed by GitHub
父節點
當前提交
b5a61d9815
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: 4AEE18F83AFDEB23
共有 1 個檔案被更改,包括 7 行新增0 行删除
  1. +7
    -0
      README.md

+ 7
- 0
README.md 查看文件

@ -101,6 +101,13 @@ hosts 文件在每个系统的位置不一,详情如下:
### 2.2 自动方式
#### 2.2.1 One-liner (for linux)
`sed -i "/# GitHub520 Host Start/Q" /etc/hosts && curl https://raw.hellogithub.com/hosts >> /etc/hosts`
自动更新`/etc/hosts`文件,可以添加到cron定时执行。使用前确保Github520内容在该文件最后部分。
#### 2.2.2
**Tip**:推荐 [SwitchHosts](https://github.com/oldj/SwitchHosts) 工具管理 hosts
以 SwitchHosts 为例,看一下怎么使用的,配置参考下面:

Loading…
取消
儲存