debian12换源命令

#中科大
sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list.d/debian.sources
#一键换2个域名
sed -i 's|security.debian.org/debian-security|mirrors.ustc.edu.cn/debian-security|g' /etc/apt/sources.list.d/debian.sources
#说明
http://mirrors.ustc.edu.cn/help/debian.html


清华
sed -i "s@/deb.debian.org@/mirrors.tuna.tsinghua.edu.cn@g" /etc/apt/sources.list.d/debian.sources
sed -i "s@/security.debian.org@/mirrors.tuna.tsinghua.edu.cn@g" /etc/apt/sources.list.d/debian.sources

阿里
sed -i "s@/deb.debian.org@/mirrors.aliyun.com@g" /etc/apt/sources.list.d/debian.sources
sed -i "s@/security.debian.org@/mirrors.aliyun.com@g" /etc/apt/sources.list.d/debian.sources
https://mirrors.aliyun.com/debian/

腾讯
sed -i "s@/deb.debian.org@/mirrors.tencentyun.com@g" /etc/apt/sources.list.d/debian.sources
sed -i "s@/security.debian.org@/mirrors.tencentyun.com@g" /etc/apt/sources.list.d/debian.sources
https://mirrors.cloud.tencent.com/

大厂源

阿里
https://mirrors.aliyun.com/debian/

腾讯
https://mirrors.cloud.tencent.com/

中科大
http://mirrors.ustc.edu.cn/help/debian.html

清华
https://mirror.tuna.tsinghua.edu.cn/help/debian/