Linux Kernel 6.0 is finally here, with many features, including support for the newest generation processors from Intel and AMD along with security updates to improve performance on various hardware devices! For end-users, the most significant change will likely be new capabilities added alongside stability improvements. Everyone should upgrade if they require only installing an updated version or understanding the risks involved in using mainline kernels.
Some of the various changes besides the typical CPU improvements include the following.
- Kernel support for NVMe in-band authentication.
- Runtime verification subsystem.
- Raspberry Pi 4 V3D kernel driver.
- IO_uring user-space block driver.
- Buffered writes on XFS file systems.
- Send Protocol V2 support for Btrfs.
- H.265/HEVC API promoted to stable.
For a complete list of changes, visit the 6.0 kernel changelog by visiting Kernel Newbies.
The following tutorial will teach you how to install Linux Kernel 6.0 on Linux Mint 21 LTS release series using the command line terminal and remove and restore the original kernel.
Table of Contents
Update Linux Mint
Before you begin, update your system to ensure all existing packages are up to date, as this is essential when installing/upgrading Linux kernels to avoid conflicts.
sudo apt update && sudo apt upgrade
Import PPA & Install Linux Kernel 6.0
The best option to install the Linux 6.0 kernels is to install the ppa:tuxinvader/jammy-mainline by TuxInvader. This has some of the most up-to-date mainline generic kernels and the previous 5.19 kernel. Linux Mint users can safely use this, as Linux Mint 21 is based on Jammy Jellyfish LTS.
Please note that these kernels will naturally be removed and replaced with updated kernels from this PPA since the mainline kernel builds naturally become EOL within a smaller time frame than LTS kernels. But, once you add the PPA, you will naturally be prompted to upgrade each time a minor update or significant release comes forward.
Import the Jammy Mainline Tuxinvader PPA as follows.
First, make sure the following dependencies are installed.
sudo apt install dirmngr ca-certificates software-properties-common gnupg gnupg2 apt-transport-https -y
Next, import the GPG key needed for all the repositories.
sudo gpg --no-default-keyring --keyring /usr/share/keyrings/tuxinvader.gpg --keyserver keyserver.ubuntu.com --recv-keys 3844A6C1C6FD1056
If you have issues importing the GPG key from LaunchPAD, please see the end section on GPG troubleshooting at the end of the article.
gpg: keybox '/usr/share/keyrings/tuxinvader.gpg' created gpg: key 3844A6C1C6FD1056: public key "Launchpad PPA for tuxinvader" imported gpg: Total number processed: 1 gpg: imported: 1
Now, import the Jammy Mainline PPA using the following command. Please note you need to import both repositories listed here for anything on your system that may require the source kernel files.
echo 'deb [signed-by=/usr/share/keyrings/tuxinvader.gpg] https://ppa.launchpadcontent.net/tuxinvader/jammy-mainline/ubuntu jammy main' | sudo tee -a /etc/apt/sources.list.d/tuxinvader.list echo 'deb-src [signed-by=/usr/share/keyrings/tuxinvader.gpg] https://ppa.launchpadcontent.net/tuxinvader/jammy-mainline/ubuntu jammy main' | sudo tee -a /etc/apt/sources.list.d/tuxinvader.list
Once installed, update your repository list.
sudo apt-get update
Next, proceed to the installation of the Linux Kernel. Ensure that any sensitive documents are backed up in case anything goes wrong.
Next, install the 6.0 generic Linux kernel drivers by executing the following command.
sudo apt-get install linux-generic-6.0
Please note that this will only work during the lifetime of Linux Kernel 6.0. After its EOL, the command will not work, and you should not be seeking to install the generic version, regardless.
Once complete, you will need to reboot your system for the new kernel to be fully activated.
Once logged back into your system, run the following command to confirm the new kernel version is running.
For people that love pretty printouts, install the neofetch package.
sudo apt install neofetch -y
Now print your system specs that will show the kernel version as follows.
How to Restore Default Kernel
For users who find the new kernel has bugs for their hardware, say, loss of sound, use the following steps to restore the default kernel; if you installed an alternative kernel, replace the default kernel section with whatever you want to install.
For users that installed the Tux PPA Mainline kernel, you must remove the repository by adding the –remove syntax to the previous add command.
sudo rm /etc/apt/sources.list.d/tuxinvader.list
Now run an APT update to ensure the repository is removed.
sudo apt-get update
Begin the removal and restoration; use the following command.
sudo apt-get autoremove linux-generic-6.0* linux-headers-6.0* linux-image-unsigned-6.0* linux-modules-6.0* -y
Next, you will see the following prompt advising that you must make sure a kernel is installed or re-installed before you reboot if you remove the current kernel. Otherwise, your system will be destroyed, unbootable, broken, etc.
Press the tab key, select <No>, and press the ENTER KEY.
Before we reboot, make sure the default generic is installed, do not fuss too much as you can install alternative versions later on as we are just trying to get your system back to working order.
sudo apt install --install-recommends linux-generic-hwe-22.04 -y
Please do not ignore this command; failure to have a kernel installed may break your system.
Now verify the kernel installed, which should be the default generic kernel.
sudo uname -r
As above, you have fallen back to the default kernel.
For those who want options besides the PPA or manually installing, check out the following custom kernel tutorials, which often boast the latest Linux custom-built kernels.
- How to Install XanMod Linux Kernel on Linux Mint 21 – Edge branch contains the latest kernel.
- How to Install Liquorix Linux Kernel on Linux Mint 21 – Often up-to-date but not as fast as XanMod, often a week behind.
How to Fix Broken LaunchPAD GPG Import
Users that have installed Linux Mint for the first time or have not imported a GPG key before using the command line terminal will often have issues importing GPG keys from LaunchPAD PPAs due to the directories not being created. This is an easy fix. Use the following command that will, in turn, generate the directories.
sudo gpg --list-keys
As above, the necessary directories have been created. This can be skipped, and use the following GPG import command below. If you have any issues with directories missing for this and any other PPA GPG key in the future, just run the above command.
Comments and Conclusion
The tutorial taught you how to install the latest 6.0 Linux kernel on your Linux Mint 21 Desktop. Note, if your system is a production system or for similar use, it would be advised to use the existing kernel that ships the standard installation for the most stability.
However, those wanting to try kernel 6.0 take backups, as many jump ahead and regret the decision. Ensure that the users who manually install the .deb packages keep checking for updates.