Debian11 升级 Debian12

今天通过园子首页链接购买了37块钱的天翼云,发现 Debian 最新版本只到11,那么就来升级一下吧。

1、更新当前系统apt updateapt full-upgrade,更新完后发现有一个包没有被升级0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.,执行apt list --upgradable -a看了一下,输出如下:

root@vm:~# apt list --upgradable -a
Listing... Done
base-files/oldstable 11.1+deb11u11 amd64 [upgradable from: 11.1+deb11u1]
base-files/now 11.1+deb11u1 amd64 [installed,upgradable to: 11.1+deb11u11]

应该是一个涉及核心系统的包,手动升级一下吧: apt-get install base-files

2、更新完成后,更换 Debian12 的源,首先备份当前源 mv /etc/apt/sources.list /etc/apt/sources.list.old,然后写入 Debian12 的源,这里用的是清华的源:

cat > /etc/apt/sources.list << EOF
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware

deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware

deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware

deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security main contrib non-free non-free-firmware
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security main contrib non-free non-free-firmware
EOF

3、继续更新系统apt updateapt full-upgrade,期间会有一些提示信息,根据需要选择。

更新完后,查看系统版本cat /etc/debian_version, 我这里显示的是12.7,嗯,最新版本 Debian 已经更新好了。

Debian 大版本升级还是一如既往的丝滑,从来没有让我失望过👍💖。

本条目发布于   那一抹余晖  阅读(601)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 单线程的Redis速度为什么快?
· SQL Server 2025 AI相关能力初探
· 展开说说关于C#中ORM框架的用法!
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
点击右上角即可分享
微信分享提示