Linux kernel 5.15 is out with many new features, support, and security. The Linux 5.15 kernel release further improves the support for AMD CPUs and GPUs, Intel’s 12th Gen CPUs, and brings new features like NTFS3, KSMBD (CIFS/SMB3), and further Apple M1 support, amongst many other changes and additions.
In the following tutorial, you will learn how to install the latest 5.15 Linux Kernel on Debian 11 Bullseye using the Debian Experimental repository with APT pinning. In time, unstable (sid) and testing (bookworm) will receive the 5.15 kernel, much like the previous 5.14 did as well.
The tutorial will be updated to reflect the changes when this change of repositories occurs.
Table of Contents
Prerequisites
- Recommended OS: Debian 11 Bullseye
- User account: A user account with sudo or root access.
Update Operating System
Update your Debian operating system to make sure all existing packages are up to date:
sudo apt update && sudo apt upgrade -y
The tutorial will be using the sudo command and assuming you have sudo status.
To verify sudo status on your account:
sudo whoami
Example output showing sudo status:
[joshua@debian~]$ sudo whoami
root
To set up an existing or new sudo account, visit our tutorial on Adding a User to Sudoers on Debian.
To use the root account, use the following command with the root password to log in.
su
Important Note
For Debian 11 operating systems that are in production or serve as a vital desktop computer, do not use the 5.15 kernel from this repository or the one you can manually download until it minimum hits the testing branch (Debian Bookworm) you are that eager to try.
Installing or upgrading to this kernel can, like any unstable package, be unpredictable in terms of operating and security and cause data loss that cannot be recovered.
Add the Unstable Repository
The first step is to import the experimental branch. For now, this is the only way to install the Linux Kernel 5.15. As explained at the start of the tutorial, it will eventually make its way to the unstable/testing branch in the next few weeks to months.
The easiest way is to open your terminal and copy and paste the following echo command to add the repositories required.
echo "deb http://deb.debian.org/debian experimental main contrib non-free" | sudo tee -a /etc/apt/sources.list
echo "deb-src http://deb.debian.org/debian experimental main contrib non-free" | sudo tee -a /etc/apt/sources.list
To confirm this was added, you can take the extra step and verify by opening the /etc/apt/sources.list file.
sudo nano /etc/apt/sources.list
Example of successful repository import:
To exit, use the (CTRL+X) keyboard combination.
Update your apt repository to reflect the new additions.
sudo apt update
Install or Upgrade Linux Kernel 5.15
With the new repository added, you can begin to install Linux Kernel 5.15.
Installation Method
Execute the following command in your terminal.
sudo apt install -t experimental linux-image-amd64
Example output:
Type “Y,” then press the “ENTER KEY” to proceed with the installation.
Upgrade Method (Recommended)
The best option is to use APT pinning so the standard update command will check the experimental repository for the linux-img-amd package first while keeping the rest of your Debian 11 packages on the existing repositories. This ensures when any updates come out, you will receive them quickly.
First, using a text editor, open/create the following file.
sudo nano /etc/apt/preferences
Next, add the following.
Package: *
Pin: release a=bullseye
Pin-Priority: 500
Package: linux-image-amd64
Pin: release a=experimental
Pin-Priority: 1000
Example:
Save the file (CTRL+O), then exit (CTRL+X).
Update the APT repository to reflect the changes.
sudo apt update
Next, you will see an update is available for the Linux kernel, begin to process.
sudo apt upgrade
Example output:
Type “Y,” then press the “ENTER KEY” to proceed with the upgrade.
Post Installation or Upgrade
Once completed, reboot your system for the new 5.15 kernel to activate.
sudo reboot now
Once logged back in, open your terminal and type the following command to verify the installation.
sudo uname -r
Example output:
5.15.0-trunk-amd64
As above, kernel 5.15 is installed. Alternative, you can run the apt-cache policy command for more information:
apt-cache policy linux-image-amd64
Example output:
As above, the kernel build is at “5.15.1”. Any new updates that arrive will automatically be seen when you run the apt update command to check for updates for the rest of your Debian 11 Bullseye repository packages.
Additionally, install the Neofetch package that will print out a fancy output in the terminal of your system specs.
sudo apt install neofetch -y
Next, run the neofetch printout command.
neofetch
Example output:
Alternative – Install XanMod Linux Kernel 5.15
An alternative method to install the Linux Kernel 5.15 is to install the custom kernel XanMod. This comes in several flavors, with at the time of this tutorial stable being 5.14 and the edge branch having the latest 5.15 kernel that is considered stable.
XanMod also features a development branch of 5.15, but the tutorial will show how to install stable or edge.
First, import the repository for XanMod.
echo 'deb http://deb.xanmod.org releases main' | sudo tee /etc/apt/sources.list.d/xanmod-kernel.list
Next, import the GPG Key.
wget -qO - https://dl.xanmod.org/gpg.key | sudo apt-key --keyring /etc/apt/trusted.gpg.d/xanmod-kernel.gpg add -
Next, update your APT repository list to reflect the new addition.
sudo apt update
Use the following command to install Linux Kernel stable, which is currently at 5.14 but will likely change to 5.15 very shortly.
sudo apt install linux-xanmod
To install the latest 5.15 kernel using the edge repository, use the following command.
sudo apt install linux-xanmod-edge
Lastly, if you want to live on the edge in production and install the development version of 5.15 (Not Recommended), use the following command.
sudo apt install linux-xanmod-tt
Once installed, reboot your system.
reboot
Once back in, verify the kernel installed.
hostnamectl
Or you can use the cat version command.
cat /proc/version
Example output:
Comments and Conclusion
In the tutorial, you have learned how to install the latest 5.15 kernel on your Debian 11 operating system using the Debian source or XanMod. Note, if your system is a production server, it would be advised to use the existing kernel that ships the standard installation for the most stability.
However, for those wanting to try kernel 5.15, you can undoubtedly swap back to previous kernels quite easily in the boot menu, so giving it a try isn’t a bad idea, especially if you got new hardware that isn’t supported by the default Debian 11 kernel.