How to upgrade Ubuntu 20.04 Linux Kernel from 5.4 to 5.15

In this tutorial, I will show you how to upgrade your Linux kernel to the latest version.

But first, what is Linux Kernel? Linux Kernel is a free and open-source, monolithic, modular, multitasking Unix-like operating system. It is the main component of a Linux operating system and is the core interface between the computer’s hardware and its processes. It makes communication possible between computer hardware and processes running on it and it manages resources effectively.

Related Articles


  • Have Ubuntu 20.04 server
  • Have commandline knowledge
  • Have access to internet.

Table of Contents

  1. Run updates for your system
  2. Check the current version of Linux kernel you are running
  3. Download Linux kernel headers from Ubuntu Mainline
  4. Download Linux Kernel image
  5. Download modules required to build the kernel
  6. Install new kernel
  7. Reboot the system
  8. Conclusion

1. Run system update

The first thing we need to do in any system is to run updates in order to make system repositories up to date. If there is any upgrade needed you can run the upgrade command too.

$ sudo apt update
$ sudo apt upgarde -y

When that is complete, move to the next step.

2. Check the current Kernel version

You need to check the current kernel you are running on your system with the following command.

$ uname -r

My Ubuntu 20.04 is running Kernel version 5.4.0-88-generic, so we need to upgrade this to the latest version. Head over to Ubuntu mainline to download the necessary files.

3. Get Linux kernel headers

We need to download the Linux kernel headers from the Ubuntu mainline. Head there and check for the latest release. If you do not want to download the tarball you can use the following command to download.

$ wget -c

You will get the following sample output

linux-headers-5.15.0-051500r 100%[===========================================>]  11.62M  16.2MB/s    in 0.7s    

2021-11-21 06:39:15 (16.2 MB/s) - ‘linux-headers-5.15.0-051500rc7_5.15.0-051500rc7.202110251930_all.deb’ saved [12189104/12189104]

Also, download generic headers with the following command

$ wget -c

4. Download Linux kernel image

Next, we will need the Linux kernel image. Download with the following command;

$ wget -c
Sample output
Saving to: ‘linux-image-unsigned-5.15.0-051500rc7-generic_5.15.0-051500rc7.202110251930_amd64.deb’

linux-image-unsigned-5.15.0- 100%[===========================================>]   9.77M  14.1MB/s    in 0.7s    

2021-11-21 06:51:50 (14.1 MB/s) - ‘linux-image-unsigned-5.15.0-051500rc7-generic_5.15.0-051500rc7.202110251930_amd64.deb’ saved [10241908/10241908]

5. Download modules necessary to build Linux kernel

What we need now are the modules that will aid in building the Linux kernel. Get the modules by downloading them from the following;

$ wget -c
sample output
Saving to: ‘linux-modules-5.15.0-051500rc7-generic_5.15.0-051500rc7.202110251930_amd64.deb’

linux-modules-5.15.0-051500r 100%[===========================================>]  72.18M  32.9MB/s    in 2.2s    

2021-11-21 07:00:18 (32.9 MB/s) - ‘linux-modules-5.15.0-051500rc7-generic_5.15.0-051500rc7.202110251930_amd64.deb’ saved [75682652/75682652]

After the download is complete it is now time to run the installation

Let’s ls to see if everything has been downloaded into the system.

$ ls

So everything is there so we are good to run the installation.

6. Install Linux kernel

To run the installation, you can use the following command;

$ sudo dpkg -i *.deb
sample output..
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.15.0-051500rc7-generic
Found initrd image: /boot/initrd.img-5.15.0-051500rc7-generic
Found linux image: /boot/vmlinuz-5.4.0-90-generic
Found initrd image: /boot/initrd.img-5.4.0-90-generic
Found linux image: /boot/vmlinuz-5.4.0-88-generic
Found initrd image: /boot/initrd.img-5.4.0-88-generic

Give it time for the installation to complete. Now we need to reboot the system for the changes to take effect.

$ sudo shutdown -r now 

Check your version again to confirm if changes took effect

$ uname -r

7. Conclusion

As you can see we have successfully upgraded to the latest stable Kernel release. In case of any difficulty, you can check this documentation.

About Kipkoech Sang

I am a technology enthusiast who loves to share gained knowledge through offering daily tips as a way of empowering others. I am fan of Linux and all other things open source.
View all posts by Kipkoech Sang →

Leave a Reply

Your email address will not be published. Required fields are marked *