How To Upgrade Linux Kernel to the Latest on Ubuntu 20.04

This tutorial intends to show you to Upgrade Linux Kernel to the Latest on Ubuntu 20.04. If you plan to update your Linux Kernel on Ubuntu 20.04 to the latest release, you can follow this guide to see how to do it.

How To Upgrade Linux Kernel to the Latest on Ubuntu 20.04?

To complete this guide, you must log in to your server as a non-root user with sudo privileges. To do this, you can follow our guide the Initial Server Setup with Ubuntu 20.04.

Now follow the steps below to update your Linux Kernel on Ubuntu 20.04.

Step 1 – Update Ubuntu 20.04 Repository

First, you must update and upgrade your Ubuntu system to ensure all existing packages are up to date. To do this, run the command below:

# sudo apt update 
# sudo apt upgrade -y

Step 2 – Check the Current Kernel Version on Ubuntu 20.04

At this point, use the following command to check your current Linux kernel:

uname -mr
Output
5.4.0-29-generic x86_64

The given output indicates that we have Linux kernel version “5.4.0-29-generic” on our Ubuntu 20.04 system.

Step 3 – Download Linux Kernel Bash Script

At this point, you need to download a kernel bash script on your Ubuntu 20.02 which is used to update your Linux kernel. To do this, run the following wget command:

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

Make your downloaded file, executable with the command below:

sudo chmod +x ubuntu-mainline-kernel.sh

Then, you need to place your Kernel script in the /usr/local/bin/ directory. To do this, run the following command:

sudo mv ubuntu-mainline-kernel.sh /usr/local/bin/

Step 4 – Update Ubuntu 20.04 Linux Kernel

Now you can easily run the command below to update your Linux Kernel on your Ubuntu server:

sudo ubuntu-mainline-kernel.sh -i

This command will find the latest version available for Linux Kernel and install it on your server.

Output
Finding latest version available on kernel.ubuntu.com
Latest version is: v6.3.5, continue? (y/N)
Will download 6 files from kernel.ubuntu.com:
Downloading amd64/linux-headers-6.3.5-060305-generic_6.3.5-060305.202305301445_amd64.deb: 100%
Downloading amd64/linux-headers-6.3.5-060305_6.3.5-060305.202305301445_all.deb: 100%
Downloading amd64/linux-image-unsigned-6.3.5-060305-generic_6.3.5-060305.202305301445_amd64.deb: 100%
Downloading amd64/linux-modules-6.3.5-060305-generic_6.3.5-060305.202305301445_amd64.deb: 100%
Downloading amd64/CHECKSUMS: 100%
Downloading amd64/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 4 packages
Cleaning up work folder

Step 5 – Reboot Ubuntu 20.04

When your installation is completed, you will need to reboot your system for the new kernel to be fully activated:

reboot

Step 6 – Confirm the new kernel version is running on Ubuntu 20.04

Once logged back into your system, run the following command to confirm the new kernel version is running:

uname -mr

In your output you will see:

Output
6.3.5-060305-generic x86_64

That’s it you are done.

Conclusion

At this point, you have learned to Upgrade your Linux Kernel to the Latest on Ubuntu 20.04 in an easy way. Linux Kernel performs the core responsibilities and enables communication between hardware and other applications. 

Hope you enjoy it. For more articles and guides, you can visit the Orcacore Blog page.

Newsletter Updates

Enter your email address below and subscribe to our newsletter

Stay informed and not overwhelmed, subscribe now!