Installing the Linux kernel 6.x on Debian 11

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 11 comes with Kernel 5.10 as default version. This can be upgraded to 6.x version available right now using the backport repository.

uname -r

Output:

root@vps:~# uname -r
5.10.0-15-amd64

Step 2 - Update the Sources

Upgrading the kernel to 6.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 http://deb.debian.org/debian bullseye-backports main" | tee -a /etc/apt/sources.list

apt-get update

Output:

root@vps:~# echo "deb http://deb.debian.org/debian bullseye-backports main" | te e -a /etc/apt/sources.list
deb http://deb.debian.org/debian bullseye-backports main

root@vps:~# apt-get update
Get:1 http://deb.debian.org/debian bullseye InRelease [116 kB]
Get:2 http://security.debian.org/debian-security bullseye-security InRelease [48.4 kB]
Get:3 http://deb.debian.org/debian bullseye-updates InRelease [44.1 kB]
Get:4 http://deb.debian.org/debian bullseye-backports InRelease [49.0 kB]
Get:5 http://security.debian.org/debian-security bullseye-security/main amd64 Packages [210 kB]
Get:6 http://security.debian.org/debian-security bullseye-security/main Translation-en [137 kB]
Get:7 http://deb.debian.org/debian bullseye/main amd64 Packages [8,183 kB]
Get:8 http://deb.debian.org/debian bullseye/main Translation-en [6,240 kB]
Get:9 http://deb.debian.org/debian bullseye-updates/main amd64 Packages.diff/Index [15.1 kB]
Get:10 http://deb.debian.org/debian bullseye-updates/main Translation-en.diff/Index [6,117 B]
Get:11 http://deb.debian.org/debian bullseye-updates/main amd64 Packages T-2022-10-31-2015.41-F-2022-08-18-2019.35.pdiff   [14.3 kB]
Get:11 http://deb.debian.org/debian bullseye-updates/main amd64 Packages T-2022-10-31-2015.41-F-2022-08-18-2019.35.pdiff [14.3 kB]
Get:12 http://deb.debian.org/debian bullseye-updates/main Translation-en T-2022-10-21-2017.32-F-2022-09-22-1635.40.pdiff [6,025 B]
Get:12 http://deb.debian.org/debian bullseye-updates/main Translation-en T-2022-10-21-2017.32-F-2022-09-22-1635.40.pdiff [6,025 B]
Get:13 http://deb.debian.org/debian bullseye-backports/main amd64 Packages [379 kB]
Get:14 http://deb.debian.org/debian bullseye-backports/main Translation-en [313 kB]
Fetched 15.8 MB in 4s (4,001 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
55 packages can be upgraded. Run 'apt list --upgradable' to see them.
N: Repository 'http://deb.debian.org/debian bullseye InRelease' changed its 'Version' value from '11.3' to '11.6'

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 bullseye-backports upgrade

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

reboot

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

Output:

root@vps:~# uname -r
6.0.0-0.deb11.6-amd64