centos7 设置启动内核


  1. 首先查看当前系统有几个内核
cat /boot/grub2/grub.cfg |grep menuentry
  1. 设置默认的启动内核
grub2-set-default 'CentOS Linux (4.18.3-1.el7.elrepo.x86_64) 7 (Core)'
  1. 验证是否修改成功
grub2-editenv list 
  1. 卸载多余内核
rpm -qa | grep kernel
yum remove