升级Ubuntu内核的几种方法

注意:

Ubuntu主线内核由 Ubuntu 内核团队提供,用于测试和调试目的。

它们不受支持且不适合生产使用。

仅当它们可以解决当前内核遇到的关键问题时,才应该安装它们。

1、手动下载deb文件升级内核

来源:kernel.ubuntu.com/mainline
linux-image-X.Y.Z-generic-*.deb
linux-modules-X.Y.Z-generic-.deb

$ sudo dpkg --install *.deb
$ sudo reboot

2、用apt升级内核(推荐)

来源:Ubuntu 官方仓库,/etc/apt/sources.list 和 /etc/apt/sources.list.d/中记录的URL
http://cn.archive.ubuntu.com/ubuntu

升级包括内核的整个系统:
$ sudo apt-get update
$ sudo apt-get upgrade

只升级内核:
$ sudo apt-get upgrade linux-image-generic

$ sudo reboot

3、使用第三方工具升级内核

(1)Ukuu
Ubuntu kernel update utility,Gtk GUI和命令行工具,Ukuu19.01版本开始收费
来源:kernel.ubuntu.com
获取最新主线内核并自动安装。

(2)Mainline
Mainline (Ubuntu Mainline Kernel Installer) 是免费版 Ukuu 的开源分支

(3)UKTools
git clone https://github.com/usbkey9/uktools & cd uktools & make
来源:kernel.ubuntu.com/~kernel-ppa/mainline/
获取最新的稳定内核并自动安装

(4)LKU
git clone https://github.com/mtompkins/linux-kernel-utilities.git
update_ubuntu_kernel.sh - download and install a precompiled Ubuntu kernel from kernel.ubuntu.com
compile_linux_kernel.sh - poll www.kernel.org for available kernels and present the user with an xconfig GUI for manually selecting options.
remove_old_kernels.sh   - purge ALL inactive kernels.

4、通过实时补丁服务升级内核(收费)

(1)Canonical 实时补丁服务
从https://auth.livepatch.canonical.com/ 获取一个密钥
$ sudo snap install canonical-livepatch
$ sudo canonical-livepatch enable your-key

(2)KernelCare 实时补丁
从https://cloudlinux.com/kernelcare-free-trial5 获取一个30天免费试用密钥
$ sudo wget -qq -O - https://repo.cloudlinux.com/kernelcare/kernelcare_install.sh | bash
$ sudo /usr/bin/kcarectl --register KEY


 

  • 12
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值