From 8a1d3039dd0355c44a941cbc20c11fd8d7ea598e Mon Sep 17 00:00:00 2001 From: xueweihan <595666367@qq.com> Date: Sun, 2 Jul 2023 23:44:07 +0800 Subject: [PATCH] update --- README_template.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README_template.md b/README_template.md index efb235ef4..b7c57a1a5 100644 --- a/README_template.md +++ b/README_template.md @@ -89,7 +89,11 @@ hosts 文件在每个系统的位置不一,详情如下: #### GNU(Ubuntu/CentOS/Fedora) -`sed -i "/# GitHub520 Host Start/Q" /etc/hosts && curl https://raw.hellogithub.com/hosts >> /etc/hosts` +``` +sudo -i +sed -i "/# GitHub520 Host Start/Q" /etc/hosts && curl https://raw.hellogithub.com/hosts >> /etc/hosts` +exit +``` #### BSD/macOS @@ -97,6 +101,10 @@ hosts 文件在每个系统的位置不一,详情如下: 将上面的命令添加到 cron,可定时执行。使用前确保 GitHub520 内容在该文件最后部分。 +#### 在 Dcker 中运行,若遇到 `Device or resource busy` 错误,可使用以下命令执行 + +`cp /etc/hosts ~/hosts.new && sed -i "/# GitHub520 Host Start/Q" ~/hosts.new && curl https://raw.hellogithub.com/hosts >> ~/hosts.new && cp -f ~/hosts.new /etc/hosts` + ### 2.4 AdGuard 用户(自动方式) 在 **过滤器>DNS 封锁清单>添加阻止列表>添加一个自定义列表**,配置如下: