腳本方法更新最新版本
# 下載下傳腳本
wget https://raw.githubusercontent.com/pimlie/ubuntu-mainline-kernel.sh/master/ubuntu-mainline-kernel.sh
# 安裝腳本
sudo install ubuntu-mainline-kernel.sh /usr/local/bin/
# 查詢最新核心版本
ubuntu-mainline-kernel.sh -c
# 安裝最新版本核心
sudo ubuntu-mainline-kernel.sh -i
# 重新開機電腦
sudo reboot
# 查詢目前核心版本
uname -rs
腳本方法安裝指定版本
# 列出所有可安裝的核心版本呢
sudo ubuntu-mainline-kernel.sh -r
# 安裝指定版本的核心
sudo ubuntu-mainline-kernel.sh -i 5.19.17
# 重新開機電腦
sudo reboot
# 查詢目前核心版本
uname -rs
腳本删除過期版本核心
# 列出所有安裝的核心版本,并根據選項删除
sudo ubuntu-mainline-kernel.sh -u
腳本幫助檔案
Usage: /usr/local/bin/ubuntu-mainline-kernel.sh -c|-l|-r|-u
Download & install the latest kernel available from kernel.ubuntu.com
Arguments:
-c Check if a newer kernel version is available
-i [VERSION] Install kernel VERSION, see -l for list. You don't have to prefix
with v. E.g. -i 4.9 is the same as -i v4.9. If version is
omitted the latest available version will be installed
-l [SEARCH] List locally installed kernel versions. If an argument to this
option is supplied it will search for that
-r [SEARCH] List available kernel versions. If an argument to this option
is supplied it will search for that
-u [VERSION] Uninstall the specified kernel version. If version is omitted,
a list of max 10 installed kernel versions is displayed
--update Update this script by redownloading it from github
-h Show this message
Optional:
-s, --signed Only install signed kernel packages (not implemented)
-p, --path DIR The working directory, .deb files will be downloaded into
this folder. If omitted, the folder /tmp/ubuntu-mainline-kernel.sh/
is used. Path is relative from $PWD
-ll, --low-latency Use the low-latency version of the kernel, only for amd64 & i386
-lpae, --lpae Use the Large Physical Address Extension kernel, only for armhf
--snapdragon Use the Snapdragon kernel, only for arm64
-do, --download-only Only download the deb files, do not install them
-ns, --no-signature Do not check the gpg signature of the checksums file
-nc, --no-checksum Do not check the sha checksums of the .deb files
-d, --debug Show debug information, all internal command's echo their output
--rc Also include release candidates
--yes Assume yes on all questions (use with caution!)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Usage: /usr/local/bin/ubuntu-mainline-kernel.sh -c|-l|-r|-u
Download & install the latest kernel available from kernel.ubuntu.com
Arguments:
-c 檢查是否有更新的核心版本
-i [VERSION] 安裝核心VERSION,請參閱-l以擷取清單。你不必加字首,例如-i 4.9與-i v4.9相同。如果版本為省略将安裝最新的可用版本
-l [SEARCH] 列出本地安裝的核心版本。如果提供了此選項的參數,它将搜尋該選項
-r [SEARCH] 列出可用的核心版本。如果提供了此選項的參數,它将搜尋
-u [VERSION] 解除安裝指定的核心版本。如果省略版本,則顯示最多10個已安裝核心版本的清單
--update 通過從github重新下載下傳來更新此腳本
-h Show this message
Optional:
-s, --signed Only install signed kernel packages (not implemented)
-p, --path DIR The working directory, .deb files will be downloaded into
this folder. If omitted, the folder /tmp/ubuntu-mainline-kernel.sh/
is used. Path is relative from $PWD
-ll, --low-latency Use the low-latency version of the kernel, only for amd64 & i386
-lpae, --lpae Use the Large Physical Address Extension kernel, only for armhf
--snapdragon Use the Snapdragon kernel, only for arm64
-do, --download-only Only download the deb files, do not install them
-ns, --no-signature Do not check the gpg signature of the checksums file
-nc, --no-checksum Do not check the sha checksums of the .deb files
-d, --debug Show debug information, all internal command's echo their output
--rc Also include release candidates
--yes Assume yes on all questions (use with caution!)