ubuntu---禁止更新内核

系统内核 4.15.0-29  更新成了 4.15.0-88,降级内核并禁止更新内核

 

查看已安装内核:dpkg --get-selections |grep linux-image

查看正在使用的内核:uname -a

删除旧内核:
sudo apt-get remove linux-image-x.xx.x-xx-generic
sudo apt-get remove linux-image-extra-x.xx.x-xx-generic  


或用这个命令移除:
sudo dpkg --purge linux-image-x.x.x-xx-generic

禁止更新内核,需时间来验证

sudo apt-mark hold linux-image-x.xx.x-xx-generic
sudo apt-mark hold linux-image-extra-x.xx.x-xx-generic


如果需要恢复原来的设定的话即允许更新内核,执行如下命令即可:
sudo apt-mark unhold linux-image-x.xx.x-xx-generic
sudo apt-mark unhold linux-image-extra-x.xx.x-xx-generic

------------------------------------------------------------
针对个人的电脑,操作:
sudo apt
-mark hold linux-headers-4.15.0-29 \ linux-headers-4.15.0-29-generic \ linux-image-4.15.0-29-generic \ linux-modules-4.15.0-29-generic \ linux-modules-extra-4.15.0-29-generic sudo apt-mark hold linux-headers-4.15.0-29 linux-headers-4.15.0-29-generic linux-image-4.15.0-29-generic linux-modules-4.15.0-29-generic linux-modules-extra-4.15.0-29-generic echo "linux-headers-4.15.0-29 hold" | dpkg --set-selections echo "linux-headers-4.15.0-29-generic hold" | dpkg --set-selections echo "linux-image-4.15.0-29-generic hold" | dpkg --set-selections echo "linux-modules-4.15.0-29-generic hold" | dpkg --set-selections echo "linux-modules-extra-4.15.0-29-generic hold" | dpkg --set-selections

@ https://blog.csdn.net/weixin_40522162/article/details/80302735

 

posted on 2020-02-28 16:24  WP的烂笔头  阅读(832)  评论(0编辑  收藏  举报