前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >centos7 选定默认启动内核,及删除无用内核

centos7 选定默认启动内核,及删除无用内核

作者头像
拓荒者
发布2019-05-31 11:12:45
1.1K0
发布2019-05-31 11:12:45
举报

为什么80%的码农都做不了架构师?>>>

centos7 选定默认启动内核,及删除无用内核

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

#使用cat /boot/grub2/grub.cfg |grep menuentry  查看系统可用内核 [root@bigapp-slave27 ~]# cat /boot/grub2/grub.cfg |grep menuentry if [ x"${feature_menuentry_id}" = xy ]; then   menuentry_id_option="--id"   menuentry_id_option="" export menuentry_id_option menuentry 'CentOS Linux (3.10.0-514.16.1.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-6f5840d0-55ac-4d3b-899b-61c0297c5347' { 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-6f5840d0-55ac-4d3b-899b-61c0297c5347' { menuentry 'CentOS Linux (0-rescue-d57307c454c0437d91c309347178cdf5) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-0-rescue-d57307c454c0437d91c309347178cdf5-advanced-6f5840d0-55ac-4d3b-899b-61c0297c5347' {   #查看当前内核 [root@bigapp-slave27 ~]# uname -r 3.10.0-514.16.1.el7.x86_64   #修改开机时默认使用的内核 grub2-set-default 'CentOS Linux (3.10.0-327.el7.x86_64) 7 (Core)'   #查看内核修改结果 [root@bigapp-slave27 ~]# grub2-editenv list saved_entry=CentOS Linux (3.10.0-327.el7.x86_64) 7 (Core)   #查看系统安装了哪些内核包 [root@bigapp-slave27 ~]# rpm -qa |grep kernel kernel-3.10.0-327.el7.x86_64 kernel-headers-3.10.0-514.6.1.el7.x86_64 kernel-tools-libs-3.10.0-327.el7.x86_64 kernel-3.10.0-514.16.1.el7.x86_64 kernel-tools-3.10.0-327.el7.x86_64   #使用yum remove 或rpm -e 删除无用内核 yum remove kernel-3.10.0-327.el7.x86_64

(adsbygoogle = window.adsbygoogle || []).push({});

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • centos7 选定默认启动内核,及删除无用内核
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档