每天 Shaarli

一天内的所有链接,汇聚在一个页面上。

February 28, 2026

Note: Debian13 修改国内源

在 Debian 13(Trixie)中修改为国内镜像源,主要是编辑 APT 源列表文件。下面是详细步骤(适用于 Debian 13 正式版或 testing 版本)。

一、备份原始源

sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak

二、编辑 sources.list

sudo nano /etc/apt/sources.list

把原来的内容替换为国内镜像(推荐清华 / 中科大 / 阿里云)。

✅ 推荐一:清华大学源(稳定快速)

deb https://mirrors.tuna.tsinghua.edu.cn/debian/ trixie main contrib non-free non-free-firmware
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ trixie-updates main contrib non-free non-free-firmware
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security trixie-security main contrib non-free non-free-firmware

✅ 推荐二:中科大源

deb 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 https://mirrors.ustc.edu.cn/debian-security trixie-security main contrib non-free non-free-firmware

✅ 推荐三:阿里云源

deb https://mirrors.aliyun.com/debian/ trixie main contrib non-free non-free-firmware
deb https://mirrors.aliyun.com/debian/ trixie-updates main contrib non-free non-free-firmware
deb https://mirrors.aliyun.com/debian-security trixie-security main contrib non-free non-free-firmware

三、更新软件列表

保存后执行:

sudo apt update

如果没有报错,就说明成功。

🔎 如果你是 testing 或 unstable

如果你安装的是:

  • testing 版 → 用 trixie
  • unstable → 用 sid
  • stable(当前稳定版) → 用 bookworm

可以用命令确认版本:

cat /etc/os-release

⚠️ 额外建议(可选优化)

安装 apt-transport-https(通常已默认支持):

sudo apt install apt-transport-https

清理旧缓存:

sudo apt clean

如果你告诉我你是 服务器还是桌面环境,我可以给你一个更精简或更完整的源配置。

Scdn Host - 专业的CDN加速与网络安全解决方案提供商 | 高防CDN加速服务

Scdn Host提供专业的CDN加速、DDoS防护、高防CDN、网站安全等服务,支持全球加速节点分发,千兆带宽不限速,7x24小时技术支持。提供WAF防火墙、CC防护、游戏盾等全方位安全解决方案,助力企业提升网站性能与安全性。