新闻公告使用手机扫一扫查看
< 返回

Debian 11跟换国内yum整理了详细跟换列表

2023-09-26 20:29 作者:旅途云官方服务 阅读量:2082

一、备份现有apt源配置

 

mv /etc/apt/sources.list /etc/apt/sources.list.old

二、替换为其他apt源

1、替换为默认官方源

 

这是一条命令,全部复制后,直接粘贴然后一起执行。

 

 

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

2、替换为清华源

 

这是一条命令,全部复制后,直接粘贴然后一起执行。

 

 

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

3、替换为中科大源

 

这是一条命令,全部复制后,直接粘贴然后一起执行。

 

 

cat > /etc/apt/sources.list << EOF

deb https://mirrors.ustc.edu.cn/debian/ bullseye main contrib non-free

deb-src https://mirrors.ustc.edu.cn/debian/ bullseye main contrib non-free

 

deb https://mirrors.ustc.edu.cn/debian/ bullseye-updates main contrib non-free

deb-src https://mirrors.ustc.edu.cn/debian/ bullseye-updates main contrib non-free

 

deb https://mirrors.ustc.edu.cn/debian/ bullseye-backports main contrib non-free

deb-src https://mirrors.ustc.edu.cn/debian/ bullseye-backports main contrib non-free

 

deb https://mirrors.ustc.edu.cn/debian-security/ bullseye-security main contrib non-free

deb-src https://mirrors.ustc.edu.cn/debian-security/ bullseye-security main contrib non-free

EOF

4、替换为腾讯云源

 

这是一条命令,全部复制后,直接粘贴然后一起执行。

 

 

cat > /etc/apt/sources.list << EOF

deb https://mirrors.cloud.tencent.com/debian/ bullseye main contrib non-free

deb-src https://mirrors.cloud.tencent.com/debian/ bullseye main contrib non-free

 

deb https://mirrors.cloud.tencent.com/debian/ bullseye-updates main contrib non-free

deb-src https://mirrors.cloud.tencent.com/debian/ bullseye-updates main contrib non-free

 

deb https://mirrors.cloud.tencent.com/debian/ bullseye-backports main contrib non-free

deb-src https://mirrors.cloud.tencent.com/debian/ bullseye-backports main contrib non-free

 

deb https://mirrors.cloud.tencent.com/debian-security/ bullseye-security main contrib non-free

deb-src https://mirrors.cloud.tencent.com/debian-security/ bullseye-security main contrib non-free

EOF

使用腾讯云服务器时,可以选择腾讯云内网源,走内网不消耗公网流量。

 

 

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

5、替换为阿里云源

 

这是一条命令,全部复制后,直接粘贴然后一起执行。

 

 

cat > /etc/apt/sources.list << EOF

deb https://mirrors.aliyun.com/debian/ bullseye main contrib non-free

deb-src https://mirrors.aliyun.com/debian/ bullseye main contrib non-free

 

deb https://mirrors.aliyun.com/debian/ bullseye-updates main contrib non-free

deb-src https://mirrors.aliyun.com/debian/ bullseye-updates main contrib non-free

 

deb https://mirrors.aliyun.com/debian/ bullseye-backports main contrib non-free

deb-src https://mirrors.aliyun.com/debian/ bullseye-backports main contrib non-free

 

deb https://mirrors.aliyun.com/debian-security/ bullseye-security main contrib non-free

deb-src https://mirrors.aliyun.com/debian-security/ bullseye-security main contrib non-free

EOF

使用阿里云服务器时,可以选择阿里云内网源,走内网不消耗公网流量。

 

 

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

6、替换为Linode源(不支持HTTPS)

 

这是一条命令,全部复制后,直接粘贴然后一起执行。

 

 

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

三、更新apt索引

 

apt update

  • 上一篇:没有了
  • 上一篇:旅途云
联系我们
返回顶部