Debian 的 APT 软件源默认使用 HTTP 协议进行传输,安全性是没有问题的。
但是如果使用 HTTPS 会让你更安心的话,只需要做以下调整就可以:
$ sudo apt install apt-transport-https ca-certificates
然后再把软件源中的仓库地址改成 HTTPS 协议:
$ sudo sed -i "s/http:\/\//https:\/\//g" /etc/apt/sources.list
最后更新一下软件源:
$ sudo apt update
Hit:1 https://deb.debian.org/debian trixie InRelease
Hit:2 https://deb.debian.org/debian-security trixie-security InRelease
Get:3 https://deb.debian.org/debian trixie-updates InRelease [47.1 kB]
Get:4 https://deb.debian.org/debian trixie-backports InRelease [53.7 kB]
Get:5 https://deb.debian.org/debian trixie-backports/main Sources.diff/Index [19.6 kB]
Get:6 https://deb.debian.org/debian trixie-backports/main amd64 Packages.diff/Index [15.1 kB]
Get:7 https://deb.debian.org/debian trixie-backports/main Sources T-2025-09-02-0814.39-F-2025-09-02-0814.39.pdiff [29 B]
Get:7 https://deb.debian.org/debian trixie-backports/main Sources T-2025-09-02-0814.39-F-2025-09-02-0814.39.pdiff [29 B]
Get:8 https://deb.debian.org/debian trixie-backports/main amd64 Packages T-2025-09-02-0814.39-F-2025-09-02-0814.39.pdiff [690 B]
Get:8 https://deb.debian.org/debian trixie-backports/main amd64 Packages T-2025-09-02-0814.39-F-2025-09-02-0814.39.pdiff [690 B]
Fetched 136 kB in 20s (6,660 B/s)
All packages are up to date.