Debian11 更换软件源,


Debian11 更换软件源

准备工作,查看Debian版本:

cat /etc/os-release

1.切换用户

#切换root用户,普通用户也可以使用sudo命令
su

2.备份

#备份软件源列表
cp /etc/apt/sources.list /etc/apt/sources.list.bak

3.编辑sources.list

#也可以使用 vim编辑
gedit /etc/apt/sources.list

替换为下面的内容:

#http://mirrors.163.com/debian/为软件源也可以为其他的 bullseye为版本代号 main non-free contrib区别如下
deb http://mirrors.163.com/debian/ bullseye main non-free contrib

deb http://mirrors.163.com/debian/ bullseye-updates main non-free contrib

deb http://mirrors.163.com/debian/ bullseye-backports main non-free contrib

deb-src http://mirrors.163.com/debian/ bullseye main non-free contrib

deb-src http://mirrors.163.com/debian/ bullseye-updates main non-free contrib

deb-src http://mirrors.163.com/debian/ bullseye-backports main non-free contrib

#deb http://mirrors.163.com/debian-security/ bullseye/updates main non-free contrib

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

#deb-src http://mirrors.163.com/debian-security/ bullseye/updates main non-free contrib

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

deb http://mirrors.ustc.edu.cn/debian-security/ stable-security main non-free contrib

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

区域软件包数量软件包组件标准
main62089遵从 Debian 自由软件指导方针(DFSG),并且不依赖于non-free
contrib351遵从 Debian 自由软件指导方针(DFSG),但依赖于non-free
non-free770不遵从 Debian 自由软件指导方针(DFSG)

更新软件源:

apt-get update

参考文章:
http://mirrors.ustc.edu.cn/help/debian-security.html

相关内容