-
查看当前正在使用的内核:
uname -a -
查看系统中已有内核:
dpkg --get-selections | grep linux-image -
安装指定内核
sudo apt-get install linux-image-5.4.0-40-generic -
卸载不需要的内核
deinstall是卸载后的状态,不要继续卸载,可以通过install来安装。
sudo apt-get remove linux-image-5.4.0-42-generic -
锁定内核版本、禁止自动更新
锁定内核版本
sudo apt-mark hold linux-image-5.4.0-42-generic sudo apt-mark hold linux-modules-extra-5.4.0-42-generic解除锁定
sudo apt-mark unhold linux-image-5.4.0-42-generic sudo apt-mark unhold linux-modules-extra-5.4.0-42-generic -
更新grub
sudo update-grub -
重新系统
reboot
文章评论