Skip to content

Instantly share code, notes, and snippets.

@hangox
Last active October 11, 2017 07:29
Show Gist options
  • Save hangox/a9b977a9c026629101c38d5e6a2b4e76 to your computer and use it in GitHub Desktop.
Save hangox/a9b977a9c026629101c38d5e6a2b4e76 to your computer and use it in GitHub Desktop.
更换cento7 的内核
#!/usr/bin/env bash
rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-3.el7.elrepo.noarch.rpm
yum --enablerepo=elrepo-kernel install kernel-ml -y
egrep ^menuentry /etc/grub2.cfg | cut -f 2 -d \'
grub2-set-default 0 # default 0 表示第一个内核设置为默认运行, 选择最新内核就对了
reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment