Why and How to install the LTS kernel in Arch Linux
The LTS kernel in Arch Linux is often recommended installing if you want to make your Arch system more stable. But what is the kernel? What are the differences between the default Linux and the LTS kernels, and which one should you choose? Finally, how to install the LTS kernel in Arch Linux? All these questions are about to be answered.
What is the kernel?
The kernel is the core program of the system. It is responsible for managing memory, CPU and other hardware of the system. Many drivers are built-into the kernel. It also communicates with the installed applications.
Actually, Linux is the kernel. The desktop environment, applications and all the other stuff is just a superstructure above the kernel. So, using the word Linux is not very accurate, if you mean a distribution. For example, Android uses the Linux kernel but it is not called Linux. That is why many people say GNU/Linux when they mean Linux distributions. Linux is much simpler to say.
Why install the LTS kernel?
If you have not changed your kernel in Arch Linux, by default you have the latest stable kernel version.
The LTS (long-term support) version is advantageous if stability is your first priority. It doesn’t mean that the latest kernel, or the default kernel, is less stable, it just means that the LTS kernel won’t be updated as frequently. So, there is a smaller chance of some conflicts after you update your system. Besides, the LTS kernel doesn’t change much, so if it works fine on your system it is likely that it will keep working properly.
On the other hand, the latest kernel is updated frequently and there are constant changes to it, so there is a higher chance of breaking something after the update. The main version of the LTS kernel doesn’t change but it keeps receiving security fixes and it may also receive some feature backports.
So, what should you do?
Installing the latest kernel is good if you want to have the latest feature, and this is what many Arch users aim for. If you have the latest hardware, it is possible that the LTS kernel may not fully support it. So, you have to use the latest kernel OS.
How to install the LTS kernel in Arch Linux
To install and activate the LTS kernel in Arch Linux, follow these steps:
-
Check your what kind of kernel you have:
uname -r
-
If it does not have ‘lts’ in its name, it is not the LTS kernel, To install the LTS kernel, run this command:
sudo pacman -S linux-lts
-
Next, you need to register the new kernel in your bootloader. For the GRUB bootloader, run this command:
sudo grub-mkconfig -o /boot/grub/grub.cfg
-
Reboot your Arch Linux.
sudo reboot
-
When you see this menu, select the Advanced options.
To get this GRUB menu, you may need to press SHIFT key or ESC key just when the boot is starting.
Boot with the LTS kernel from the Advanced options.
-
After the system boot, open the terminal and check the kernel version. It should be the LTS kernel.
uname -r
-
It is safe to remove the non-lts kernel now, which is a default kernel in Arch Linux. And do not forget to re-generate GRUB config, so it doesn’t show a removed kernel:
sudo pacman -R linux sudo grub-mkconfig -o /boot/grub/grub.cfg
After these steps, you will have only the LTS kernel in your system. If you do not remove the default kernel, Arch Linux will use the default kernel after the next reboot. If you use the latest kernel, you can install the LTS kernel as a fallback kernel. In case that something happens to your latest kernel, you can boot with the LTS kernel.
Benefits of the LTS Kernel
Personally for me, the LTS kernel has several advantages.
It works better with VirtualBox. I had some problems with the latest kernel and VirtualBox because the kernel updates were more frequent than the updates for VirtualBox. Once VirtualBox just stopped working and to fix it, I needed to switch to an older kernel.
It’s better for a multi-boot system. I also like the infrequent updates of the LTS kernel. I multi-boot my Arch Linux with several other Linux OSes and I need to update my GRUB manually every kernel update. As the LTS kernel is not updated as frequently as the latest kernel, I don’t have to update my GRUB often with the LTS kernel.
You may also like these tips and tricks after installing Arch Linux. Thanks for reading.
Comments
VPhat
I use ArchCraft Linux. Its default kernel is 5.12. I install kernel-5.10-lts by pacman. But I can’t boot to that lts kernel. When I boot it, my pc only show a blackscreen. Pls help me to solve this.
Average Linux User
Most likely you have the graphics driver built with the latest kernel and it doesn’t work with LTS.
porosenokPoroshenko
The same problem lol
Abhay Patel
This issue has been fixed in latest archcraft iso.
Miguel
Hi, I can not remove the non-lts kernel. When I try to do it, it fails because of some dependencies… should I remove it anyway and break dependencies?
This is the output I get:
###@:~|⇒ uname -r 5.10.20-1-lts ###@:~|⇒ pacman -R linux checking dependencies… error: failed to prepare transaction (could not satisfy dependencies) :: removing linux breaks dependency ‘linux’ required by nvidia :: removing linux breaks dependency ‘linux’ required by virtualbox-host-modules-arch
Average Linux User
I do not have a solution right away. You need to try different options. It seems you have nvidia and virtualbox modules installed with non-lts kernel. Maybe try reinstalling them with the LTS kernel and then remove the regular kernle:
Also, if you google
removing linux breaks dependency ‘linux’ required by nvidia
, you will find a few suggestions. Try them.Miguel
Thank you Average… It didn’t work but It gave the right idea I think. What I did was:
So, what I did was uninstalling the conflicting packages, then uninstalled non-lts kernel, then reinstalling the same packages.
Average Linux User
👍
Miguel
However, today nvidia and virtualbox received updates and standard linux was installed again as ad dep, and this time I can do nothing. Oh boy…
IMPORTANT: you should uninstall linux-headers if you don’t wan’t to have problems with drivers that are being compiled in your machine.
Average Linux User
Thanks for the update on this. Yeap, you will have many issues with Arch Linux, but this is the best way to learn 😉
Lost
use nvidia-dkms driver
castAway
Nvidia-lts to be used with linux-lts and all other lts specific packages, such as those related to virtual box . On that case, virtualbox requires some dkms packages to work with linux-lts, need check that carefully
Striker
Dude - I've watch you channel for years and keep coming back to your page for reference- Thx.
Awesome work!
Cheers!
Ankit
same
Average Linux User
Happy to be helpful 😊
Nish
A question here is that now I always have to goto advanced option and select LTS. If i just select the arch option from the first page then it gets stuck as “linux” was removed.
Average Linux User
You need to remove that kernel and re-configure GRUB:
giavi
Hi Alu,
I'd like to go for a stable version of the kernel too, so thank you for this tutorial. However, it is already about one and a half year old: is it still valid? Regarding the linux-headers: what are they? Shouldn't we replace them with linux-lts-headers? I'm afraid that I will not be able to boot my computer and this would mean be stuck with my work, this is why I need to be absolutely sure about the procedure to follow.
Thank your for any help!
Giavi
Hiếu Nguyễn Văn Minh Hiếu
I'm using archlinux-lts. I want update new archlinux-lts then use which pacman?
Average Linux User
Run a regular Arch update command, and it will update the LTS kernel if a newer version is available:
Average Linux User
@giavi if you run an LTS kernel and you need kernel headers, install
linux-lts-headers
.GOldman
Next, you need to register the new kernel in your bootloader. For the GRUB bootloader, run this command:” What if I do not use GRUB?
Average Linux User
Then you need to consult Arch Linux wiki for how to add a kernel to your bootloader. What’s your bootloader?
OneCore
Hi … Thanks for the tips, anyway i just wanna know what your opinion about zen kernel, compared to lts kernel?
Average Linux User
I have not tried zen kernel but I assume it is difficult to feel the difference in real life. Have you used the zen kernel?