centos7 選定默認啓動內核,及刪除無用內核

使用cat /boot/grub2/grub.cfg |grep menuentry 查看系統可用內核

[root@localhost ~]# cat /boot/grub2/grub.cfg |grep menuentry

系統可用內核
查看當前內核版本

[root@bigapp-slave27 ~]# uname -r

當前內核版本

修改開機時默認使用的內核

[root@localhost ~]# grub2-set-default 'CentOS Linux (5.2.1-1.el7.elrepo.x86_64) 7 (Core)'

在這裏插入圖片描述
查看內核修改結果

[root@localhost ~]# grub2-editenv list

在這裏插入圖片描述
查看系統安裝了哪些內核包

[root@localhost ~]#  rpm -qa |grep kernel

在這裏插入圖片描述
使用yum remove 或rpm -e 刪除無用內核

[root@localhost ~]# yum remove kernel-3.10.0-693.el7.x86_64

在這裏插入圖片描述

發佈了59 篇原創文章 · 獲贊 248 · 訪問量 12萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章