bian正式发布了,还在debian12的用户可以考虑升级到debian13了。主机测评在这里介绍最简单的升级办法,复制、粘贴、回车即可!注意:数据无价,备份了再升级,避免出现错误导致不必要的损失。

第一步:先升级现有系统组件
apt update
apt upgrade
apt full-upgrade
第二步:清理废物
apt –purge autoremove
然后重启: reboot
第三步:确认当前版本
cat /etc/debian_version
确定你当前已经是最新的debian12了,别搞了半天还是debian11或者其他
第四步:修改源文件
sed -i ‘s/bookworm/trixie/g’ /etc/apt/sources.list
sed -i ‘s/bookworm/trixie/g’ /etc/apt/sources.list.d/*
或者你干脆替换吧,国内用:
cat > /etc/apt/sources.list << EOF
deb https://mirrors.huaweicloud.com/debian/ trixie main non-free non-free-firmware contrib
deb-src https://mirrors.huaweicloud.com/debian/ trixie main non-free non-free-firmware contrib
deb https://mirrors.huaweicloud.com/debian-security/ trixie-security main
deb-src https://mirrors.huaweicloud.com/debian-security/ trixie-security main
deb https://mirrors.huaweicloud.com/debian/ trixie-updates main non-free non-free-firmware contrib
deb-src https://mirrors.huaweicloud.com/debian/ trixie-updates main non-free non-free-firmware contrib
deb https://mirrors.huaweicloud.com/debian/ trixie-backports main non-free non-free-firmware contrib
deb-src https://mirrors.huaweicloud.com/debian/ trixie-backports main non-free non-free-firmware contrib
EOF
海外用:
cat > /etc/apt/sources.list << EOF
deb http://mirrors.linode.com/debian/ trixie main non-free non-free-firmware contrib
deb-src http://mirrors.linode.com/debian/ trixie main non-free non-free-firmware contrib
deb http://mirrors.linode.com/debian-security/ trixie-security main
deb-src http://mirrors.linode.com/debian-security/ trixie-security main
deb http://mirrors.linode.com/debian/ trixie-updates main non-free non-free-firmware contrib
deb-src http://mirrors.linode.com/debian/ trixie-updates main non-free non-free-firmware contrib
deb http://mirrors.linode.com/debian/ trixie-backports main non-free non-free-firmware contrib
deb-src http://mirrors.linode.com/debian/ trixie-backports main non-free non-free-firmware contrib
EOF
接下来回车执行,然后更新过程中根据需要选择是或者否升级你需要升级的,实在不懂就一路yes+回车 !
最后一步:清理废物
apt –purge autoremove
apt autoclean
再次提醒:升级之前备份你的数据,别搞翻车了没办法后悔!
如果机器上没有重要的东西,你可以直接从第四步开始执行!
最新评论
Hey! I could have sworn I've been to this blog before but after checking through some of the post I realized it's new to me. Anyways, I'm definitely delighted I found it and I'll be book-marking and checking back often!
Heya i am for the primary time here. I came across this board and I to find It really helpful & it helped me out much. I'm hoping to give something back and help others like you helped me.
Pretty element of content. I simply stumbled upon your website and in accession capital to claim that I acquire in fact enjoyed account your weblog posts. Any way I’ll be subscribing for your augment and even I success you access persistently rapidly.
Would love to perpetually get updated outstanding weblog! .
Some really nice stuff on this internet site, I like it.
Can I simply say what a reduction to find somebody who actually knows what theyre talking about on the internet. You positively know find out how to carry an issue to mild and make it important. Extra individuals have to read this and understand this facet of the story. I cant believe youre not more fashionable because you positively have the gift.
I like this post, enjoyed this one appreciate it for posting.
Definitely, what a splendid blog and enlightening posts, I surely will bookmark your site.Best Regards!