我要升级到Debian12尝鲜了!Linux内核果然更新到6.1了!奈斯!














先将当前版本更新到最新

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


安装常用工具

apt install -y curl wget sudo


创建更新源目录与文件

sudo mkdir -p /etc/apt/sources.list.d/

sudo touch /etc/apt/sources.list.d/example.list



注入12的源

sudo sed -i 's/bullseye/bookworm/g' /etc/apt/sources.list

sudo sed -i 's/bullseye/bookworm/g' /etc/apt/sources.list.d/example.list



开始升级

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


清除老系统残留

apt autoremove -y && apt autoclean -y


重启 SSH端口回归默认22

reboot


一键清理垃圾

sudo apt autoremove --purge -y

sudo apt clean -y

sudo apt autoclean -y

sudo apt remove --purge $(dpkg -l | awk '/^rc/ {print $2}') -y

sudo journalctl --rotate

sudo journalctl --vacuum-time=1s

sudo journalctl --vacuum-size=50M

sudo apt remove --purge $(dpkg -l | awk '/^ii linux-(image|headers)-[^ ]+/{print $2}' | grep -v $(uname -r | sed 's/-.*//') | xargs) -y





查看Debian版本

cat /etc/debian_version




查看Linux内核版本  牛啊 最新的6.1

uname -r







查看当前系统中Linux内核版本列表

dpkg --list | grep linux-image





删除ARM的旧内核

sudo apt remove linux-image-5.10.0-21-arm64


删除AMD的旧内核

sudo apt remove linux-image-5.10.0-21-amd64

sudo apt remove linux-image-5.10.0-21-cloud-amd64



这比ubuntu更新简单太多了







评论

此博客中的热门博文

科技lion官方一键脚本上线!VPS监控测试建站维护于一身的全能工具箱

2023国外的接码平台分享

CloudCone付费VPS分享 挺便宜的