简单快速将debian11升级到debian12

有些vps/云服务器/独立服务器拿到之后默认还是给的debian11系统,而且还不提供debian12;虽然说用也不是不可以,但是为了安全或者又喜欢追新的话还是升级一下到debian12比较好。这里简单介绍下快速将debian11升级到debian12的方法,如果有数据的话记得提前备份好,避免出现不必要的损失。简单几步把debian 9升级到debian 10

 

默认操作:

apt update && apt upgrade

 

接下来,完成后复制下面代码,粘贴输入进去:

cat > /etc/apt/sources.list << EOF
deb https://mirrors.huaweicloud.com/debian/ bookworm main non-free non-free-firmware contrib
deb-src https://mirrors.huaweicloud.com/debian/ bookworm main non-free non-free-firmware contrib
deb https://mirrors.huaweicloud.com/debian-security/ bookworm-security main
deb-src https://mirrors.huaweicloud.com/debian-security/ bookworm-security main
deb https://mirrors.huaweicloud.com/debian/ bookworm-updates main non-free non-free-firmware contrib
deb-src https://mirrors.huaweicloud.com/debian/ bookworm-updates main non-free non-free-firmware contrib
deb https://mirrors.huaweicloud.com/debian/ bookworm-backports main non-free non-free-firmware contrib
deb-src https://mirrors.huaweicloud.com/debian/ bookworm-backports main non-free non-free-firmware contrib
EOF
或者
cat > /etc/apt/sources.list << EOF
deb http://mirrors.linode.com/debian/ bookworm main non-free non-free-firmware contrib
deb-src http://mirrors.linode.com/debian/ bookworm main non-free non-free-firmware contrib
deb http://mirrors.linode.com/debian-security/ bookworm-security main
deb-src http://mirrors.linode.com/debian-security/ bookworm-security main
deb http://mirrors.linode.com/debian/ bookworm-updates main non-free non-free-firmware contrib
deb-src http://mirrors.linode.com/debian/ bookworm-updates main non-free non-free-firmware contrib
deb http://mirrors.linode.com/debian/ bookworm-backports main non-free non-free-firmware contrib
deb-src http://mirrors.linode.com/debian/ bookworm-backports main non-free non-free-firmware contrib
EOF

国内机器选择前面华为的源,国外的推荐选择linode的源,然后回车。

 

再就是下一步、下一步…

 

最后重启系统!

 

debian 9 升级 debian 10 :https://www.zhujiceping.com/37040.html

debian 10 升级debian 11:https://www.zhujiceping.com/64312.html

debian 11升级 debian 12:https://www.zhujiceping.com/70432.html

本站QQ群:812451114,联系站长:zhujiceping@vip.qq.com