使用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