ubuntu server命令行更新内核2

1、下载ubuntu-mainline-kernel脚本:

wget https://raw.githubusercontent.com/pimlie/ubuntu-mainline-kernel.sh/master/ubuntu-mainline-kernel.sh

2、将脚本放在可执行路径中:

install ubuntu-mainline-kernel.sh /usr/local/bin/

3、检查当前可以下载安装的内核版本:

ubuntu-mainline-kernel.sh -r

4、返回不同版本:

5、下载安装指定版本内核v6.0.0

ubuntu-mainline-kernel.sh -i v6.0.0

7、返回代码:

Downloading index from kernel.ubuntu.com
Expected to need to download 6 files but found 8, continue? (y/N)
Will download 8 files from kernel.ubuntu.com:
Downloading arm64/linux-headers-6.0.0-060000-generic-64k_6.0.0-060000.202210022231_arm64.deb: 100%   
Downloading arm64/linux-headers-6.0.0-060000-generic_6.0.0-060000.202210022231_arm64.deb: 100%   
Downloading arm64/linux-image-unsigned-6.0.0-060000-generic-64k_6.0.0-060000.202210022231_arm64.deb: 100%   
Downloading arm64/linux-image-unsigned-6.0.0-060000-generic_6.0.0-060000.202210022231_arm64.deb: 100%   
Downloading arm64/linux-modules-6.0.0-060000-generic-64k_6.0.0-060000.202210022231_arm64.deb: 100%   
Downloading arm64/linux-modules-6.0.0-060000-generic_6.0.0-060000.202210022231_arm64.deb: 100%   
Downloading arm64/CHECKSUMS: 100%   
Downloading arm64/CHECKSUMS.gpg: 100%   
Importing kernel-ppa gpg key ok
Signature of checksum file has been successfully verified
Checksums of deb files have been successfully verified with sha256sum
Installing 6 packages

8、查看当前已通过该脚本安装的内核版本:

ubuntu-mainline-kernel.sh -l

9、重启查看是否使用新内核:

uname -r

发表评论