Debian 9 升级 Debian 10

更新软件索引以及本地已有软件:

apt update && apt upgrade -y

切换 stretch 源到 buster 源

sed -i 's/stretch/buster/g' /etc/apt/sources.list

更新软件索引并升级系统:

apt update && apt upgrade -y && apt dist-upgrade -y && apt autoremove -y

接下来就是系统升级的过程了,其中有一些选项需要操作,基本都是按回车或者输入 Y 并回车即可。

升级完成后建议重启一下系统:

reboot

Debian 10 升级 Debian 11

更新软件索引以及本地已有软件:

apt update && apt upgrade -y

切换到 bullseye 源:

vim /etc/apt/sources.list

修改为以下内容:

deb http://deb.debian.org/debian/ bullseye main contrib non-free
deb-src http://deb.debian.org/debian/ bullseye-updates main contrib non-free

deb http://security.debian.org/debian-security bullseye-security main
deb-src http://security.debian.org/debian-security bullseye-security main
deb http://ftp.debian.org/debian bullseye-backports main contrib non-free

更新软件索引并升级系统:

apt update && apt upgrade -y && apt full-upgrade -y && apt autoremove -y

重启系统:

reboot

Ubuntu 18.04 升级 Ubuntu 20.04

更新软件索引以及本地已有软件:

apt update && apt upgrade -y

如果没有 update-manager-core 软件包的话需要先安装,有的话直接跳下一步:

apt install update-manager-core -y

升级系统:

do-release-upgrade

接下来就是系统升级的过程了,其中有一些选项需要操作,基本都是按回车或者输入 Y 并回车即可。

升级完成后系统会要求重启。

最后修改:2021 年 12 月 23 日
如果觉得我的文章对你有用,请随意赞赏