Debian 13(代号Trixie)apt源设置

Debian 13(代号 Trixie)是最新稳定版 Debian 操作系统,自带一系列现代化特性与长期稳定支持,适合服务器、嵌入式与桌面用途。总体定位是“稳定与自由软件精神并存”,在兼容性与安全性上非常强。

1.核心与平台更新

· 使用 Linux 6.6 或更高内核(取决于发行时间),改善硬件支持与能效,尤其是对新CPU、GPU、存储设备支持更好。
· 默认支持 64位(amd64)、ARM、RISC-V 等多平台,适合多样化部署。

2.适用场景

Debian 13 的特性在于稳定性、硬件兼容与软件生态成熟度。相比上一代,它对现代硬件、容器与安全性做了明显提升,非常适合企业服务器、DevOps 平台、开发测试机、嵌入式系统等长期运行场景。

3.apt源设置国内源

/etc/apt/sources.list.d/debian.sources

Types: deb
URIs: https://mirrors.tuna.tsinghua.edu.cn/debian
Suites: trixie trixie-updates trixie-backports
Components: main contrib non-free non-free-firmware
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
# Types: deb-src
# URIs: https://mirrors.tuna.tsinghua.edu.cn/debian
# Suites: trixie trixie-updates trixie-backports
# Components: main contrib non-free non-free-firmware
# Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg

# 以下安全更新软件源包含了官方源与镜像站配置,如有需要可自行修改注释切换
Types: deb
URIs: https://security.debian.org/debian-security
Suites: trixie-security
Components: main contrib non-free non-free-firmware
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg

# Types: deb-src
# URIs: https://security.debian.org/debian-security
# Suites: trixie-security
# Components: main contrib non-free non-free-firmware
# Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg

sed批量替换

sed -i 's#deb.debian.org/debian#mirrors.tuna.tsinghua.edu.cn/debian#g'  /etc/apt/sources.list.d/debian.sources

root@6ef714ea9d5b:/etc/apt/sources.list.d# cat debian.sources 
Types: deb
# http://snapshot.debian.org/archive/debian/20251020T000000Z
URIs: http://mirrors.tuna.tsinghua.edu.cn/debian
Suites: trixie trixie-updates
Components: main
Signed-By: /usr/share/keyrings/debian-archive-keyring.pgp

Types: deb
# http://snapshot.debian.org/archive/debian-security/20251020T000000Z
URIs: http://mirrors.tuna.tsinghua.edu.cn/debian-security
Suites: trixie-security
Components: main
Signed-By: /usr/share/keyrings/debian-archive-keyring.pgp
root@6ef714ea9d5b:/etc/apt/sources.list.d# 
root@6ef714ea9d5b:/etc/apt/sources.list.d# pwd
/etc/apt/sources.list.d