debian 12换国内源或者升级到debian 13换源方法
1.备份原始文件
cp /etc/apt/sources.list /etc/apt/sources.list.bak2.编辑源文件
vi /etc/apt/sources.listdeb http://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware deb http://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware deb http://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware deb http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
3.替换 bookworm 为 trixie
sed -i 's/bookworm/trixie/g' /etc/apt/sources.list
find /etc/apt/sources.list.d/ -type f -exec sed -i 's/bookworm/trixie/g' {} \;4.更新系统
apt update
其他源地址:
清华大学开源软件镜像站::mirrors.tuna.tsinghua.edu.cn
南京大学镜像站::mirror.nju.edu.cn
USTC (中国科学技术大学) 开源软件镜像站::mirrors.ustc.edu.cn

此处评论已关闭