[root@t0 ~]# uname -r #查看当前内核版本
3.10.0-957.27.2.el7.x86_64
[root@t0 ~]#
[root@t0 ~]# cat /boot/grub2/grub.cfg |grep "menuentry" #查看所有的内核版本
menuentry 'CentOS Linux (3.10.0-327.el7.x86_64) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-327.el7.x86_64-advanced-e40bd680-cabe-477a-acd0-00b97281f618' {
menuentry 'CentOS Linux (3.10.0-957.27.2.el7.x86_64) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-327.el7.x86_64-advanced-e40bd680-cabe-477a-acd0-00b97281f618' {
menuentry 'CentOS Linux (0-rescue-840af4f292644fe6b63eefc86c7f7b09) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-0-rescue-840af4f292644fe6b63eefc86c7f7b09-advanced-e40bd680-cabe-477a-acd0-00b97281f618' {
[root@t0 ~]#
[root@t0 ~]# grub2-set-default 'CentOS Linux (3.10.0-327.el7.x86_64) 7 (Core)' #修改内核版本为 3.10.0-327.el7.x86_64
[root@t0 ~]#
[root@t0 ~]# grub2-editenv list #查看内核修改结果
saved_entry=CentOS Linux (3.10.0-957.27.2.el7.x86_64) 7 (Core)