Insight: Multiple Ways To Upgrade Linux Kernel In Ubuntu 20.04 LTS
Update: Linux Kernel 5.14 LTS Released
In this kernel tutorial post, we are going to write about the multiple ways to update Linux Kernel in Ubuntu 20.04 LTS and its derivatives.
At the time of updating this article, Linux Kernel 5.14is the latest version available for download. There are multiple ways to update Linux Kernel in Ubuntu 20.04 LTS operating system. You can also use this method to install or upgrade Linux Kernel in Linux Mint operating system.
Multiple Ways To Upgrade Linux Kernel In Ubuntu 20.04 LTS
Note: Please make sure that you have a backup of your important file before upgrading the Linux kernel.
First Method:
In this step, we will use UkTools to upgrade Linux Kernel in Ubuntu 20.04 LTS. Run the following command to download and install UkTools in Ubuntu:
git clone https://github.com/usbkey9/uktools && cd uktools make
Run the following command to upgrade Kernel:
do-kernel-upgrade
Run the following command to remove old and unused kernels in Ubuntu :
do-kernel-purge
Second Method:
In this method, we will use the bash script to update and upgrade Linux kernel. We will use Linux Kernel Utilities which is a set of BASH shell scripts that can be used to update Linux kernels. There are 3 scripts in this shell scripts:
- compile_linux_kernel.sh
- update_ubuntu_kernel.sh
- remove_old_kernels.sh
Compile_linux_kernel.sh:- To compile and install the latest Linux Kernel from the source.
update_ubuntu_kernel.sh:- To downloads and install/update the already compiled Ubuntu Kernel.
remove_old_kernel.sh:- To removes all inactive and unused Linux Kernels from the system.
Run the following commands to install Linux Kernel utilities in Ubuntu 20.04 LTS:
git clone https://github.com/mtompkins/linux-kernel-utilities.git
cd linux-kernel-utilities/
chmod 750 *.sh
git pull
Now, Run the following command to list the available Kernel. Follow the on-screen instruction and select the latest kernel.
./compile_linux_kernel.sh
Run the following command to compile and install the latest available Linux Kernel:
./compile_linux_kernel.sh --latest
Run the following command to install precompiled Kernel:
./update_ubuntu_kernel.sh
To compile a kernel from a local archive file
./compile_linux_kernel.sh --archive=linux-x.x.x.tar.xz
It will list out the all available pre-compiled Linux Kernels from Kernel.ubuntu.com. You can see the number and you need to enter the desired number to install the selected Kernel.
Now restart your Ubuntu system.
Meanwhile, To download and install the latest a precompiled Ubuntu kernel from kernel.ubuntu.com, Run the following command:
./update_ubuntu_kernel.sh --latest
Now, Run the following command to remove old kernels.
./remove_old_kernels.sh
Third Method:
We will use ubuntu-mainline-kernel.sh bash script utility tool to upgrade Linux kernel in Ubuntu. Run the following command to download and install utility tool in Ubuntu.
wget https://raw.githubusercontent.com/pimlie/ubuntu-mainline-kernel.sh/master/ubuntu-mainline-kernel.sh chmod +x ubuntu-mainline-kernel.sh sudo mv ubuntu-mainline-kernel.sh /usr/local/bin/
Now, run the following command to install the latest version of Linux Kernel in Ubuntu and Linux mint.
ubuntu-mainline-kernel.sh -i