XanMod is a popular Linux kernel modification that provides enhanced performance and stability for gaming, streaming, and other resource-intensive tasks. The XanMod team is known for its timely release of new kernels, which often include support for the latest hardware before it is available on other distributions. For desktop users who are not into gaming or streaming, XanMod can still be a desirable choice for its up-to-date hardware support. In addition to its kernel modifications, XanMod offers many other features and tweaks that make it an appealing option for many users.
For more information on XanMod Kernel before installing, visit the XanMod Kernel features information page.
XanMod Kernel only supports x86_64 processor architecture.
XanMod Kernel DOES NOT support secure boot.
In the following tutorial, you will learn how to install XanMod Kernel on Linux Mint 21 LTS release using the command line terminal with various options, such as installing branches and updating and removing the custom kernel by restoring the default version.
Table of Contents
Update Linux Mint
Before proceeding, update your system using the following command to ensure no conflicts during the installation.
sudo apt update && sudo apt upgrade
Install Required Packages
The following dependencies will need to be installed. Most of these packages are already on your system, but running the command can help ensure they are installed.
sudo apt install dirmngr ca-certificates software-properties-common gnupg gnupg2 apt-transport-https curl -y
Import the XanMod Repository
The first task is to import the XanMod repository. This can be done in several ways, but the tutorial will use the apt package manager’s terminal to simplify things.
First, import the GPG key using the following command.
curl -fsSL https://dl.xanmod.org/gpg.key | gpg --dearmor | sudo tee /usr/share/keyrings/xanmod.gpg > /dev/null
Next, import the repository using the following command.
echo 'deb [signed-by=/usr/share/keyrings/xanmod.gpg] http://deb.xanmod.org releases main' | sudo tee /etc/apt/sources.list.d/xanmod-kernel.list
Next, update your APT repository source listing to reflect the new addition.
sudo apt update
As you may have noticed, the repository typically has newer packages for installed dependencies.
Before continuing, run the apt upgrade command.
sudo apt upgrade
Install XanMod Kernel
With the XanMod repository installed and up to date, you can install the Linux kernel from XanMod. In the future, some of these will update. For example, Edge will always be on the latest stable kernel release.
The tutorial will go over installing all three, but it’s recommended to stick to stable and edge, do not use development unless you know what you are doing.
Install XanMod stable
sudo apt install linux-xanmod
Install XanMod Edge (Recommended for Latest Linux Mainline Kernel)
sudo apt install linux-xanmod-edge
Install XanMod Task Type CPU Sched (TT)
sudo apt install linux-xanmod-tt
Install XanMod Latest (RT) Kernel
sudo apt install linux-xanmod-rt
Install XanMod LTS Kernel
sudo apt install linux-xanmod-lts
Once the chosen repository Linux kernel has been installed, you will need to reboot your system to complete the installation.
reboot
Once you have returned to your system, verify the installation.
At the time of the tutorial, the edge branch contained Linux kernel 5.19, but this will change almost the same day a new Linux kernel is released, such as Linux kernels 6.0, 6.1, 6.2, and so on.
Verify the kernel installed by using the following cat command.
cat /proc/version
Alternatively, install Neofetch to print out your system specs.
sudo apt install neofetch -y
Next, use the neofetch command to print your system specs to reveal the kernel version.
neofetch
Example output:
How to Update/Upgrade XanMod Kernel
To keep the Linux kernel, you installed with XanMod up to date; you will run the standard apt update and upgrade commands if you installed XanMod using APT, which the tutorial has shown.
To check for updates.
sudo apt update
If an upgrade is available.
sudo apt upgrade
How to Remove (Uninstall) XanMod Kernel
To remove XanMod, use the following command that suites the version of the XanMod kernel you installed.
Remove XanMod Stable
sudo apt autoremove linux-xanmod --purge
Remove XanMod Edge
sudo apt autoremove linux-xanmod-edge --purge
Remove XanMod Task Type CPU Sched (TT)
sudo apt autoremove linux-xanmod-tt --purge
Remove XanMod Latest (RT) Kernel
sudo apt autoremove linux-xanmod-rt --purge
Remove XanMod LTS Kernel
sudo apt autoremove linux-xanmod-lts --purge
Ideally, you can remove the repository as well.
sudo rm /etc/apt/sources.list.d/xanmod-kernel.list
And for users that will never re-install XanMod again, best to remove the GPG key for good practice.
sudo rm /usr/share/keyrings/xanmod.gpg
Next, run the following dpkg –list command.
dpkg --list | grep `uname -r`
Example output:
The names shown in the output are the ones you need to remove that involve the XanMod Kernel, which should be displayed only.
Example only:
sudo apt autoremove linux-image-5.19.4-xanmod* linux-headers-5.19.4-xanmod* --purge
Remember to replace the x.x.x version printed in the dpkg –list command.
Alternatively, you could take a shortcut using this command, but be careful not to remove existing kernels of the same version.
sudo apt autoremove linux-image-5.*.*-xanmod* linux-headers-5.*.*-xanmod* --purge
Remember, when Linux Kernel 6.0 is released, replace the above 5.*.* with 6.*.*.
This should result in the original Linux Kernel in the output terminal messages.
Lastly, ensure you re-install the Linux Kernel generic with Linux Mint 21. This, in most cases, should be present, but rebooting your system without a kernel installed will lead to significant issues you do not want.
sudo apt install linux-image-generic -y
The tutorial still had the kernel present, but you should always check. If a kernel is present, then that is good. This exercise is just about ensuring you do.
Run a quick update-grub and initramfs.
sudo update-initramfs -u && sudo update-grub
Now restart your PC to finalize the removal of XanMod. If you are in the terminal, you can quickly do this using the following command.
reboot
Once you have returned to your system, verify the installation rollback.
cat /proc/version
For users that installed Neofetch, use the command to print out your system specs again.
neofetch
Example output:
As shown above, you have rolled back to the default Linux kernel, thus successfully removing XanMod from your system.
Comments and Conclusion
If you are looking for a Linux distribution that provides enhanced performance and stability for gaming, streaming, or other resource-intensive tasks, XanMod is an excellent option. The team is known for its timely release of new kernels, which often include support for the latest hardware before it is available on other distributions. Desktop users who are not into gaming or streaming can still benefit from using XanMod because of its focus on system stability and reliability.