Debian 11 如何更换国内源?
安装好 Debian 11 系统后,我们一般都会把默认源更换为国内源,这样更新的速度以及连接的稳定性都有很大的提高。
1、在做任何修改之前,先备份是一个好的习惯:
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
2、替换成国内源(以清华大学的源为例):
编辑 /etc/apt/sources.list 源列表文件:
sudo vi /etc/apt/sources.list
删除 sources.list
文件里原来所有的内容。复制下面的内容到里面去。然后保存退出即时生效。
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
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
发表评论