cat > /etc/apt/sources.list << EOF deb https://deb.debian.org/debian/ bullseye main contrib non-free deb-src https://deb.debian.org/debian/ bullseye main contrib non-free deb https://deb.debian.org/debian/ bullseye-updates main contrib non-free deb-src https://deb.debian.org/debian/ bullseye-updates main contrib non-free deb https://deb.debian.org/debian/ bullseye-backports main contrib non-free deb-src https://deb.debian.org/debian/ bullseye-backports main contrib non-free deb https://deb.debian.org/debian-security/ bullseye-security main contrib non-free deb-src https://deb.debian.org/debian-security/ bullseye-security main contrib non-free EOF
替换为阿里云源
1 2 3 4 5 6 7 8 9 10
cat > /etc/apt/sources.list << EOF deb https://mirrors.aliyun.com/debian/ bullseye main non-free contrib deb-src https://mirrors.aliyun.com/debian/ bullseye main non-free contrib deb https://mirrors.aliyun.com/debian-security/ bullseye-security main deb-src https://mirrors.aliyun.com/debian-security/ bullseye-security main deb https://mirrors.aliyun.com/debian/ bullseye-updates main non-free contrib deb-src https://mirrors.aliyun.com/debian/ bullseye-updates main non-free contrib deb https://mirrors.aliyun.com/debian/ bullseye-backports main non-free contrib deb-src https://mirrors.aliyun.com/debian/ bullseye-backports main non-free contrib EOF
替换腾讯云源
1 2 3 4 5 6 7 8 9 10
cat > /etc/apt/sources.list << EOF deb https://mirrors.tencent.com/debian/ bullseye main non-free contrib deb-src https://mirrors.tencent.com/debian/ bullseye main non-free contrib deb https://mirrors.tencent.com/debian-security/ bullseye-security main deb-src https://mirrors.tencent.com/debian-security/ bullseye-security main deb https://mirrors.tencent.com/debian/ bullseye-updates main non-free contrib deb-src https://mirrors.tencent.com/debian/ bullseye-updates main non-free contrib deb https://mirrors.tencent.com/debian/ bullseye-backports main non-free contrib deb-src https://mirrors.tencent.com/debian/ bullseye-backports main non-free contrib EOF
如果是阿里云或者腾讯云的机器还可以使用内网源。
阿里云内网源
1 2 3 4 5 6 7 8 9 10
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-security/ bullseye-security main contrib non-free deb-src http://mirrors.cloud.aliyuncs.com/debian-security/ bullseye-security main contrib non-free EOF
腾讯云内网源
1 2 3 4 5 6 7 8 9 10
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