整理了下 Debian10 升级到 Debian11 的方法
切到 root (sudo -i), 执行下面的命令
apt update -y && apt upgrade -y; sed -i 's/buster/bullseye/g' /etc/apt/sources.list; sed -i 's/^.* bullseye\/updates .*$//g' /etc/apt/sources.list;
apt update -y && apt upgrade -y && apt full-upgrade -y; apt dist-upgrade -y && apt autoremove -y
执行中, 可能会被询问的问题
- Continue without installing GRUB?
Yes
- What do you want to do about modified configuration file sshd_config?
Keep the local version currently installed
(如果有问) - Restart servuces during package upgrades without asking?
Yes
; - 其他问题, 一般默认回车就行了
reboot
重启
最终 /etc/apt/sources.list
看起来是这样(也可以直接改成下面的内容)
deb http://deb.debian.org/debian bullseye main
deb-src http://deb.debian.org/debian bullseye main
deb http://security.debian.org/debian-security bullseye-security main
deb-src http://security.debian.org/debian-security bullseye-security main
deb http://deb.debian.org/debian bullseye-updates main
deb-src http://deb.debian.org/debian bullseye-updates main
deb http://deb.debian.org/debian bullseye-backports main
deb-src http://deb.debian.org/debian bullseye-backports main
查看当前Linux版本
cat /etc/os-release