Debian 升级Linux内核

更新内核 以下过程都需要有 root 权限!

  1. 添加 Backports 源

Debian 10:

echo “deb http://deb.debian.org/debian buster-backports main” > /etc/apt/sources.list.d/backports.list

Debian 11:

echo “deb http://deb.debian.org/debian bullseye-backports main” > /etc/apt/sources.list.d/backports.list

apt update

 

  1. 安装新内核

Debian 10:

apt -t buster-backports install linux-image-amd64 apt -t buster-backports install linux-headers-amd64 update-grub

Debian 11:

apt -t bullseye-backports install linux-image-amd64 apt -t bullseye-backports install linux-headers-amd64 update-grub

  1. 重启 并查看内核是否已经更新:

uname -r

 

4.卸载旧内核

查看系统内核:

dpkg –list | grep linux-image

删除旧内核:

apt purge linux-image-x.xxx-xx-amd64 (在确保剩余至少一个最新内核下,删除旧内核, xxx 替换为旧版内核编号)

删除旧内核头文件:

dpkg –list | grep linux-headers apt purge linux-headers-x.xxx-xx-amd64

❗注意:卸载了旧内核后一定要确保剩余至少一个最新内核:

update-grub

 

Tagged on: ,

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.