Ubuntu 24.04 分区,以及更换 kernel 6.18

Ubuntu 24.04 分区建议

Ubuntu 24.04 分区建议

更换 kernel 6.18

# 查看已经有的 kernel 版本
# sudo apt-cache search linux-headers | grep 6.1

sudo add-apt-repository ppa:cappelikan/ppa -y
sudo apt update && sudo apt install mainline -y

安装新版的 kernel 6.18,执行命令后,工具会自动开始内核相关文件的下载:

sudo mainline install 6.18

# 安装完成后,重启系统
sudo reboot

# 重启后,查看当前内核版本
uname -r

实际上,所有可用的kernel版本都可以从Ubuntu官方仓库看到:https://kernel.ubuntu.com/mainline/

安装完成并重启之后,可以锁定当前版本:

sudo apt-mark hold  $(dpkg -l | grep -E "linux-(headers|image|unsigned|modules|modules-extra)" | grep 6.12.3 | awk '{print $2}')

删除旧版本 kernel(需要先锁定当前新版本,不然新版本也会删除):

# 查看已经安装的 kernel 版本
dpkg -l | grep -E "linux-(headers|image|modules-extra)+" | grep -v 6.12.3 | awk '{print $2}'

# 删除旧版本 kernel
dpkg -l | grep -E "linux-(headers|image|modules-extra)+" | grep -v 6.12.3 | awk '{print $2}' | xargs -I {} sudo apt remove -y {}

参考链接:




    Enjoy Reading This Article?

    Here are some more articles you might like to read next:

  • 在Ubuntu上部署OpenMAIC
  • AI工具大全
  • Fast DDS入门(On-Going)
  • NVIDIA GPU 架构:SP、SM 与 LSU 工作原理详解
  • al-folio 模板定制修改总结