Debian 11 升级到 Debian 12 教程

Debian 11 升级到 Debian 12 教程

第一步:更新当前系统

sudo apt update
sudo apt upgrade -y
sudo apt full-upgrade -y
sudo apt --purge autoremove -y

第二步:修改软件源为 Debian 12(Bookworm)

创建/etc/apt/sources.list

cat <<EOF | sudo tee /etc/apt/sources.list
deb http://deb.debian.org/debian bullseye main contrib non-free
deb http://security.debian.org/debian-security bullseye-security main contrib non-free
deb http://deb.debian.org/debian bullseye-updates main contrib non-free
EOF

然后统一替换为 Bookworm:

sudo sed -i 's/bullseye/bookworm/g' /etc/apt/sources.list

第三步:正式升级系统

sudo apt update
sudo apt upgrade --without-new-pkgs -y
sudo apt full-upgrade -y

第四步:重启并检查系统版本

reboot

重新连接服务器,检查系统版本:

lsb_release -a

应该显示如下:

Description:    Debian GNU/Linux 12 (bookworm)

系统升级结束。

附加步骤,插件安装,可能用的到

安装 croncrontab

apt update && apt install cron -y

安装 acme.sh

curl https://get.acme.sh | sh

安装结束。

© 版权声明
THE END
喜欢就支持一下吧
点赞73 分享
相关推荐