Debian 11 bullseye 国内外镜像源收集
如果你的机器使用国内(中国内地)网络,使用一些镜像源可能出现无法连上或者连接很慢,可以替换成国内的镜像源。
一、备份现有配置
mv /etc/apt/sources.list /etc/apt/sources.list.old
二、替换其他的镜像源
1、默认官方源(全球)
cat > /etc/apt/sources.list << EOF
deb http://deb.debian.org/debian/ bullseye main contrib non-free
deb-src http://deb.debian.org/debian/ bullseye main contrib non-free
deb http://deb.debian.org/debian/ bullseye-updates main contrib non-free
deb-src http://deb.debian.org/debian/ bullseye-updates main contrib non-free
deb http://deb.debian.org/debian/ bullseye-backports main contrib non-free
deb-src http://deb.debian.org/debian/ bullseye-backports main contrib non-free
deb http://deb.debian.org/debian-security/ bullseye-security main contrib non-free
deb-src http://deb.debian.org/debian-security/ bullseye-security main contrib non-free
EOF
2、Linode源 (国外)
cat > /etc/apt/sources.list << EOF
deb http://mirrors.linode.com/debian/ bullseye main contrib non-free
deb-src http://mirrors.linode.com/debian/ bullseye main contrib non-free
deb http://mirrors.linode.com/debian/ bullseye-updates main contrib non-free
deb-src http://mirrors.linode.com/debian/ bullseye-updates main contrib non-free
deb http://mirrors.linode.com/debian/ bullseye-backports main contrib non-free
deb-src http://mirrors.linode.com/debian/ bullseye-backports main contrib non-free
deb http://mirrors.linode.com/debian-security/ bullseye-security main contrib non-free
deb-src http://mirrors.linode.com/debian-security/ bullseye-security main contrib non-free
EOF
3、腾讯云的镜像源
cat > /etc/apt/sources.list << EOF
deb http://mirrors.tencentyun.com/debian/ bullseye main contrib non-free
deb-src http://mirrors.tencentyun.com/debian/ bullseye main contrib non-free
deb http://mirrors.tencentyun.com/debian/ bullseye-updates main contrib non-free
deb-src http://mirrors.tencentyun.com/debian/ bullseye-updates main contrib non-free
deb http://mirrors.tencentyun.com/debian/ bullseye-backports main contrib non-free
deb-src http://mirrors.tencentyun.com/debian/ bullseye-backports main contrib non-free
deb http://mirrors.tencentyun.com/debian-security/ bullseye-security main contrib non-free
deb-src http://mirrors.tencentyun.com/debian-security/ bullseye-security main contrib non-free
EOF
4、阿里云的镜像源
cat > /etc/apt/sources.list << EOF
deb http://mirrors.cloud.aliyuncs.com/debian/ bullseye main contrib non-free
deb-src http://mirrors.cloud.aliyuncs.com/debian/ bullseye main contrib non-free
deb http://mirrors.cloud.aliyuncs.com/debian/ bullseye-updates main contrib non-free
deb-src http://mirrors.cloud.aliyuncs.com/debian/ bullseye-updates main contrib non-free
deb http://mirrors.cloud.aliyuncs.com/debian/ bullseye-backports main contrib non-free
deb-src http://mirrors.cloud.aliyuncs.com/debian/ bullseye-backports main contrib non-free
deb http://mirrors.cloud.aliyuncs.com/debian/ bullseye-proposed-updates main contrib non-free
deb-src http://mirrors.cloud.aliyuncs.com/debian/ bullseye-proposed-updates main contrib non-free
deb http://mirrors.cloud.aliyuncs.com/debian-security/ bullseye-security main contrib non-free
deb-src http://mirrors.cloud.aliyuncs.com/debian-security/ bullseye-security main contrib non-free
EOF
5、清华大学的镜像源
cat > /etc/apt/sources.list << EOF
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free
EOF
6、中国科学技术大学的镜像源
cat > /etc/apt/sources.list << EOF
deb http://mirrors.ustc.edu.cn/debian bullseye main contrib non-free
deb-src http://mirrors.ustc.edu.cn/debian bullseye main contrib non-free
deb http://mirrors.ustc.edu.cn/debian bullseye-updates main contrib non-free
deb-src http://mirrors.ustc.edu.cn/debian bullseye-updates main contrib non-free
deb http://mirrors.ustc.edu.cn/debian bullseye-proposed-updates main contrib non-free
deb-src http://mirrors.ustc.edu.cn/debian bullseye-proposed-updates main contrib non-free
EOF
三、更新配置
上述设置完之后,需要执行更新命令让其生效。
sudo apt-get update