Debian    8.0 ~ 11.0
 Ubuntu    16.04 ~ 21.04
 Kali Linux    2.0 ~ 2021.2
 RHEL    7.0 ~ 8.4
 CentOS    7.0 ~ 8.4
 Fedora    28 ~ 34

一键换国内源

bash <(curl -sSL https://gitee.com/SuperManito/LinuxMirrors/raw/main/ChangeMirrors.sh)

本脚本适合CentOS 5、6、7,Ubuntu 14.04、16.04、18.04,Debian 7、8、9,一键匹配换源。

手动更换源也非常的简单,只需要按几步即可完成,这个脚本只是把这简单的几步用一键完成,为你更换更快的软件源。虽然比较简单,但对管理多台Linux服务器的人,或是经常重装系统的人来说能方便不少。

废话不多说,脚本纯净,除了修改软件源文件,不会另外添加其他任何文件或配置,也不会修改其他无关的设置,无残留,代码不加密,这也是我的脚本的原则,功能代码只有一百来行,请自查。

用法

bash <(wget --no-check-certificate -qO- https://cdn.jsdelivr.net/gh/Moexin/Shell@master/Mirror.sh)

对于 Debian 默认换源为Fastly CDN的Mirror这个源有Fastly的加持对境外主机都有不错的速度。 对于Ubuntu和CentOS系统都默认换为阿里云的Mirror这个源有阿里云全球CDN的加持,全球都有不错的速度。

对于Debian系统还设置了四套其他的源,阿里云,CloudFront CDN,网易163,中科大的源,请根据需要使用参数一键设置如

bash <(wget --no-check-certificate -qO- https://cdn.jsdelivr.net/gh/Moexin/Shell@master/Mirror.sh) cn
bash <(wget --no-check-certificate -qO- https://cdn.jsdelivr.net/gh/Moexin/Shell@master/Mirror.sh) 163
bash <(wget --no-check-certificate -qO- https://cdn.jsdelivr.net/gh/Moexin/Shell@master/Mirror.sh) aliyun
bash <(wget --no-check-certificate -qO- https://cdn.jsdelivr.net/gh/Moexin/Shell@master/Mirror.sh) aws

如果对配置的文件不满意,还可以一键还原

bash <(wget --no-check-certificate -qO- https://cdn.jsdelivr.net/gh/Moexin/Shell@master/Mirror.sh) restore

源码查看: https://raw.githubusercontent.com/Moexin/Shell/master/Mirror.sh

Last modification:March 21, 2023
If you think my article is useful to you, please feel free to appreciate