得彼恩 Debian是一个轻量化的Linux系统,最新版的Debian12也仅仅只有600多MB。
轻量意味着精简了很多东西,更改国内镜像就折腾了一段时间,把步骤记录一下:
首先文本编辑器是不支持gedit这样图形化的,只能采用nano或vim等
1. su 进入root模式
2. nano /etc/apt/sources.list 修改源文件
3. 删除或使用#注释掉原内容,替换成以下内容,注意大小写,冒号、分号等
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释 deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware # deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware # deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware # deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware deb https://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware # deb-src https://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
debian | 镜像站使用帮助 | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror
如果是虚拟机的话,可以采用以下的方式直接粘贴
4. Ctrl+X、Y、回车退出编辑器,执行apt-get update
其他源参考这篇文章: