查看当前已安装的内核
| $ sudo dpkg |
| linux-image-5.15.0-71-generic install |
| linux-image-5.15.0-72-generic install |
| linux-image-5.4.0-149-generic install |
| linux-image-generic-hwe-20.04 install |
安装指定版本内核
Install kernel-generic:通用内核,一般 PC 及 Server
| sudo apt list linux-headers-5.15.*-*-generic linux-image-5.15.*-*-generic |
| sudo apt install linux-headers-5.15.*-*-generic linux-image-5.15.*-*-generic |
Install low-latency kernel:低延迟内核,适用于工业嵌入式系统(Industrial embedded systems)
| sudo apt list linux-headers-5.15.*-*-lowlatency linux-image-5.15.*-*-lowlatency |
| sudo apt install linux-headers-5.15.*-*-lowlatency linux-image-5.15.*-*-lowlatency |
更新initramfs
| sudo update-initramfs -u -k all |
修改引导菜单
/etc/default/grub
| GRUB_DEFAULT=0 |
| |
| GRUB_TIMEOUT=20 >>>>>>>>>>>设置菜单超时时长 |
| GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` |
| GRUB_CMDLINE_LINUX_DEFAULT="" |
| GRUB_CMDLINE_LINUX="" |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
sudo update-grub
reboot
通过grub菜单进入使用新内核的系统
sudo apt autoremove
卸载掉旧内核
| 检查内核启动顺序 |
| |
| grep menuentry /boot/grub/grub.cfg |
| |
| 编辑默认启动内核 |
| |
| vim /etc/default/grub |
| |
| GRUB_DEFAULT=0 |
| |
| 修改GRUB_DEFAULT的值为"1>2" |
| |
| GRUB_DEFAULT="Advanced options for Ubuntu>Ubuntu, with Linux 5.4.0-42-generic" |
| |
| sudo update-grub |
| |
| reboot |
| |
| uname -r |
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
· 【自荐】一款简洁、开源的在线白板工具 Drawnix