你提到的 “sedebian” 可能是笔误,常见相关概念是 Debian 或 Raspberry Pi OS(基于 Debian,旧称 Raspbian)。下面我分别说明如何加速 Debian 系统本身,以及如何加速 Debian 的软件安装(apt),这是最常见需求。
编辑源文件:
sudo nano /etc/apt/sources.list
以清华源为例(Debian 12 bookworm):
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security main contrib non-free
更新:
sudo apt update
sudo apt upgrade
查看开机启动项:
systemctl list-unit-files --type=service | grep enabled
关闭示例:
sudo systemctl disable bluetooth
sudo systemctl disable avahi-daemon
如果机器配置低,推荐:
安装 XFCE:
sudo apt install xfce4
sudo apt install zram-tools
sudo systemctl enable zram-config
systemdquiet splash mitigations=off
sudo nano /etc/apt/apt.conf.d/99parallel
加入:
Acquire::Queue-Mode "host";
Acquire::Retries "3";
sudo apt install apt-fast
sudo apt-fast update
sudo apt-fast install 软件名
sudo apt autoremove
sudo apt clean
额外建议:
例如批量改文件:
sed -i 's/old/new/g' *.conf
可加 parallel 加速:
ls *.conf | parallel sed -i 's/old/new/g' {}
如果你能补充一下:
我可以给你更精确的加速方案。