Installing the Linux kernel 5.x on Debian 10

Kernel is central component of an operating system that manages operations of computer and hardware. It basically manages operations of memory and CPU time. It is core component of an operating system. Kernel acts as a bridge between applications and data processing performed at hardware level using inter-process communication and system calls.

Step 1 - Find Current Kernel Version

Debian 10 comes with Kernel 4.19 as default version. This can be upgraded to 5.x version available right now using the backport repository.

Let us confirm the current kernel version we're on using the uname command.

uname -r


root@vps:~# uname -r

Step 2 - Update the Sources

Upgrading the kernel to 5.x requires you to add the backports repository into the sources.list file. Backports are the packages from the next version of Debian that is going to be or has been released.

Let us add the backports repository into sources.list and update the packages,

echo "deb buster-backports main" | tee -a /etc/apt/sources.list

apt-get update


root@vps:~# echo "deb buster-backports main" | tee -a /etc/apt/sources.list
deb buster-backports main

root@vps:~# apt-get update
Hit:1 buster/updates InRelease
Hit:2 buster InRelease
Get:3 buster-updates InRelease [56.6 kB]
Get:4 buster-backports InRelease [51.4 kB]
Get:5 buster-backports/main amd64 Packages [487 kB]
Get:6 buster-backports/main Translation-en [411 kB]
Fetched 1,007 kB in 1s (1,242 kB/s)
Reading package lists... Done

Step 3 - Install the Kernel

Once the packages have been updated, let us verify the kernel versions which are available for us to install.

For this, run the following command,

apt search linux-image

You can notice several versions being listed that are available from backports repository.

To install the new kernel, run the following command,

apt -t buster-backports upgrade

Once the Kernel has been installed, reboot the server so it can boot into the new version.


Step 4 - Verify the Kernel Version

Now, let us confirm the kernel version the Debian system is on by using the uname command.

uname -r


root@vps:~# uname -r