vbskycn / hosts

一键修改hosts,让你的linux可以直连github,tmdb

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

一键修改hostshosts

一键修改hosts,让你的linux可以直连github,tmdb

如果你之前修改了hosts,可以一键恢复初始化hosts

使用curl

curl -fsSL https://mirror.ghproxy.com/raw.githubusercontent.com/vbskycn/hosts/master/clean_hosts.sh | bash

使用wget

wget -qO- https://mirror.ghproxy.com/raw.githubusercontent.com/vbskycn/hosts/master/clean_hosts.sh | bash

你可以使用curl或者wget来下载并执行这个程序。下面是两种不同的方法:

使用curl

curl -fsSL https://mirror.ghproxy.com/raw.githubusercontent.com/vbskycn/hosts/master/auto_hosts.sh | bash

使用wget

wget -qO- https://mirror.ghproxy.com/raw.githubusercontent.com/vbskycn/hosts/master/auto_hosts.sh | bash

image-20240515093447944

可以定时每天3点自动执行

crontab -e

然后,在文件末尾添加以下行:

0 3 * * * curl -fsSL https://mirror.ghproxy.com/raw.githubusercontent.com/vbskycn/hosts/master/auto_hosts.sh | bash && chmod +x auto_hosts.sh

保存并退出编辑器。cron 将会在每天的凌晨 3 点自动执行该脚本。

About

一键修改hosts,让你的linux可以直连github,tmdb


Languages

Language:Shell 100.0%