Debian13换源 更换国内软件仓库源!

in 学习笔记 with 0 comment

Debian Buster 以上版本默认支持 HTTPS 源。如果遇到无法拉取 HTTPS 源的情况,请先使用 HTTP 源并安装:

sudo apt install apt-transport-https ca-certificates

编辑文件,在/etc/apt/sources.list.d/编辑sources.list文件,nano命令:ctrl+o保存,enter回车确认,ctrl+X退出,ctrl+k删除行/剪切

sudo nano /etc/apt/sources.list

写入内容,Debian版本【Debian 13(trixie)】,启用源码镜像【否】,使用官方安全更新软件源选择【否】,sources.list文件写入:

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.ustc.edu.cn/debian/ trixie main contrib non-free non-free-firmware
# deb-src https://mirrors.ustc.edu.cn/debian/ trixie main contrib non-free non-free-firmware

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

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

# 以下安全更新软件源包含了官方源与镜像站配置,如有需要可自行修改注释切换
deb https://mirrors.ustc.edu.cn/debian-security trixie-security main contrib non-free non-free-firmware
# deb-src https://mirrors.ustc.edu.cn/debian-security trixie-security main contrib non-free non-free-firmware

# deb https://security.debian.org/debian-security trixie-security main contrib non-free non-free-firmware
# # deb-src https://security.debian.org/debian-security trixie-security main contrib non-free non-free-firmware
Responses