查看当前版本
lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 9.13 (stretch)
Release: 9.13
Codename: stretch
更新到当前版本的最新版
apt-get update
apt-get upgrade
apt-get dist-upgrade
备份原来的源
cp /etc/apt/sources.list /etc/apt/sources.list.bak
将debian9
源代号stretch
,改为debian10
代号buster
sed -i 's/stretch/buster/g' /etc/apt/sources.list
升级到debian10
apt-get update
apt-get upgrade
apt-get dist-upgrade
重启
reboot
查看版本
lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 10 (buster)
Release: 10
Codename: buster
清理老版本软件
apt-get autoremove
更新到testing
testing版本为测试版本, 他的 apt 仓库是更新的, 一般也很稳定了
需要注意,为了减少问题出现,务必先更新到当前最新稳定版再更新testing
sed -i 's/buster/testing/g' /etc/apt/sources.list
apt-get update
apt-get upgrade
apt-get dist-upgrade
结合此文将系统和内核更新至最新
# Debian升级内核
参考:https://www.cnblogs.com/chnmig/p/12661605.html