{"id":146190,"date":"2024-12-08T12:44:25","date_gmt":"2024-12-08T12:44:25","guid":{"rendered":"https:\/\/linuxiac.com\/?p=146190"},"modified":"2024-12-15T13:06:50","modified_gmt":"2024-12-15T13:06:50","slug":"arch-linux-switching-between-multiple-kernels","status":"publish","type":"post","link":"https:\/\/linuxiac.com\/arch-linux-switching-between-multiple-kernels\/","title":{"rendered":"Arch Linux: Installing and Switching Between Multiple Kernels"},"content":{"rendered":"\n<div class=\"wp-block-ultimate-post-table-of-content ultp-block-417a31\"><div class=\"ultp-block-wrapper\"><div class=\"ultp-block-toc\"><div class=\"ultp-toc-header\"><div class=\"ultp-toc-heading\">Table of Contents<\/div><div class=\"ultp-collapsible-toggle  ultp-collapsible-right\"><a class=\"ultp-collapsible-text ultp-collapsible-open\" href=\"javascript:;\">[Open]<\/a><a class=\"ultp-collapsible-text ultp-collapsible-hide\" href=\"javascript:;\">[Close]<\/a><\/div><\/div><div class=\"ultp-block-toc-style1 ultp-block-toc-body\" style=\"display:block;\"><ul class=\"ultp-toc-lists\"><li><a href=\"#Official_Kernels\">Official Kernels<\/a><ul class=\"ultp-toc-lists\"><li><a href=\"#Default_Stable_Kernel_linux\">Default Stable Kernel (linux)<\/a><\/li><li><a href=\"#Long-Term_Support_LTS_Kernel_linux-lts\">Long-Term Support (LTS) Kernel (linux-lts)<\/a><\/li><li><a href=\"#Hardened_Kernel_linux-hardened\">Hardened Kernel (linux-hardened)<\/a><\/li><li><a href=\"#Realtime_Kernel_linux-rt\">Realtime Kernel (linux-rt)<\/a><\/li><li><a href=\"#Zen_Kernel_linux-zen\">Zen Kernel (linux-zen)<\/a><\/li><\/ul><\/li><li><a href=\"#Unofficial_Kernels\">Unofficial Kernels<\/a><ul class=\"ultp-toc-lists\"><li><a href=\"#Liquorix_Kernel_linux-lqx\">Liquorix Kernel (linux-lqx)<\/a><\/li><li><a href=\"#XanMod_Kernel_linux-xanmod\">XanMod Kernel (linux-xanmod)<\/a><\/li><li><a href=\"#Libre_Kernel_linux-libre\">Libre Kernel (linux-libre)<\/a><\/li><li><a href=\"#Clear_Linux_Kernel_linux-clear\">Clear Linux Kernel (linux-clear)<\/a><\/li><li><a href=\"#CK_Kernel_linux-ck\">CK Kernel (linux-ck)<\/a><\/li><\/ul><\/li><li><a href=\"#Switching_Between_Kernels_on_Arch_Linux\">Switching Between Kernels on Arch Linux<\/a><ul class=\"ultp-toc-lists\"><li><a href=\"#Switching_Kernels_with_GRUB\">Switching Kernels with GRUB<\/a><\/li><li><a href=\"#Switching_Kernels_with_systemd-boot\">Switching Kernels with systemd-boot<\/a><\/li><\/ul><\/li><li><a href=\"#Conclusion\">Conclusion<\/a><\/li><\/ul><\/div><\/div><\/div><\/div>\n\n\n\n<p>One of the best things about <a href=\"https:\/\/linuxiac.com\/archlinux\/\">Arch Linux<\/a> is its incredible flexibility and customization options. And as you know, the kernel is the heart of any Linux distro, and Arch is no exception.<\/p>\n\n\n\n<p>However, many Arch users stick with the default one that comes with the distribution and rarely, if ever, explore alternatives. There\u2019s absolutely nothing wrong with this\u2014after all, the default kernel is always the latest and greatest, offering support for the newest hardware.<\/p>\n\n\n\n<p>But what if I told you that switching to a different kernel could unlock even more potential you can squeeze from your system? Because sometimes, the newest kernel isn\u2019t necessarily the best fit.<\/p>\n\n\n\n<p>For example, after a recent upgrade on one of my Arch desktop systems, my Razer keyboard and mouse peripherals (guilty, I&#8217;m gaming a lot) started acting up. A quick investigation revealed a compatibility issue between the open-razer module and the latest kernel.<\/p>\n\n\n\n<p>So, what do you think I did? Switching to Arch&#8217;s LTS kernel instantly resolved the issue. Later, an updated version of the latest kernel fixed the problem for good. This is just one of many scenarios where Arch\u2019s flexibility to use different kernels can make a real difference.<\/p>\n\n\n\n<p>But before we move on to the purely technical part, let me give you a quick rundown of the official Linux kernels Arch provides, along with a few popular unofficial ones you might come across.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"Official_Kernels\">Official Kernels<\/h2>\n\n\n\n<p>Arch provides five official kernel packages to cater to different user needs. They are maintained and distributed by the Arch Linux development team or trusted contributors as part of the official repositories.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"Default_Stable_Kernel_linux\">Default Stable Kernel (linux)<\/h3>\n\n\n\n<p>This is the <a href=\"https:\/\/www.kernel.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">standard vanilla kernel<\/a> that comes with the Arch default install. It provides the latest stable release from the mainline Linux kernel and is best for general use. This is your go-to kernel if you want the newest features and hardware support without compromising stability.<\/p>\n\n\n\n<p>Command to install it + header files:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"Bash\" data-shcb-language-slug=\"bash\"><span><code class=\"hljs language-bash\">sudo pacman -S linux linux-headers<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Bash<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">bash<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h3 class=\"wp-block-heading\" id=\"Long-Term_Support_LTS_Kernel_linux-lts\">Long-Term Support (LTS) Kernel (linux-lts)<\/h3>\n\n\n\n<p>Arch as a server? Why not? The LTS kernel focuses on stability and long-term maintenance, receiving updates primarily for security fixes and critical bugs. It usually is several versions behind the latest mainline one. Suitable for systems where stability is paramount, like servers or production environments. It&#8217;s also great if you prefer a &#8220;set it and forget it&#8221; approach.<\/p>\n\n\n\n<p>Command to install it + header files:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"Bash\" data-shcb-language-slug=\"bash\"><span><code class=\"hljs language-bash\">sudo pacman -S linux-lts linux-lts-headers<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Bash<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">bash<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h3 class=\"wp-block-heading\" id=\"Hardened_Kernel_linux-hardened\">Hardened Kernel (linux-hardened)<\/h3>\n\n\n\n<p>As the name suggests, security is the priority here. <a href=\"https:\/\/github.com\/anthraxx\/linux-hardened\" target=\"_blank\" rel=\"noreferrer noopener\">This kernel<\/a> includes additional patches and configurations to harden the system against vulnerabilities, thus minimizing the risk of exploits. So, if you are paranoid about security, this is probably your choice.<\/p>\n\n\n\n<p>Command to install it + header files:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-3\" data-shcb-language-name=\"Bash\" data-shcb-language-slug=\"bash\"><span><code class=\"hljs language-bash\">sudo pacman -S linux-hardened linux-hardened-headers<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-3\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Bash<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">bash<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h3 class=\"wp-block-heading\" id=\"Realtime_Kernel_linux-rt\">Realtime Kernel (linux-rt)<\/h3>\n\n\n\n<p>Designed for real-time applications, <a href=\"https:\/\/wiki.linuxfoundation.org\/realtime\/start\" target=\"_blank\" rel=\"noreferrer noopener\">this kernel<\/a> ensures minimal latency and predictable task scheduling. It is best for audio production, video editing, and other time-sensitive tasks where delays can be disruptive.<\/p>\n\n\n\n<p>Command to install it + header files:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-4\" data-shcb-language-name=\"Bash\" data-shcb-language-slug=\"bash\"><span><code class=\"hljs language-bash\">sudo pacman -S linux-rt linux-rt-headers<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-4\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Bash<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">bash<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h3 class=\"wp-block-heading\" id=\"Zen_Kernel_linux-zen\">Zen Kernel (linux-zen)<\/h3>\n\n\n\n<p><a href=\"https:\/\/github.com\/zen-kernel\/zen-kernel\" target=\"_blank\" rel=\"noreferrer noopener\">Zen kernel<\/a> is a community-driven project that aims to provide a more optimized and responsive Linux kernel for everyday systems. On a personal note &#8211; it&#8217;s my favorite and go-to choice.<\/p>\n\n\n\n<p>It incorporates numerous performance enhancements, scheduler tweaks, and other modifications to improve desktop interactivity and system responsiveness. Best for desktop users, gamers, and multimedia enthusiasts. <\/p>\n\n\n\n<p>Command to install it + header files:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-5\" data-shcb-language-name=\"Bash\" data-shcb-language-slug=\"bash\"><span><code class=\"hljs language-bash\">sudo pacman -S linux-zen linux-zen-headers<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-5\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Bash<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">bash<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h2 class=\"wp-block-heading\" id=\"Unofficial_Kernels\">Unofficial Kernels<\/h2>\n\n\n\n<p>In addition to the officially supported above, Arch gives users even more choices and control over their system\u2019s behavior, performance characteristics, and philosophical alignment than the official upstream options.<\/p>\n\n\n\n<p>While the official kernels (like the stable, LTS, Hardened, Zen, and Realtime variants) already cater to a broad range of scenarios, unofficial kernels fill specialized niches and explore alternative optimizations that might not be part of the standard Arch offerings. Below is a list of the most commonly used.<\/p>\n\n\n\n<p>It&#8217;s important to note that these kernels aren&#8217;t part of the official Arch repositories, but you can install them through the AUR. To do this, you&#8217;ll need an AUR helper, such as <code>yay<\/code>. If you&#8217;re unsure how to set one up, don&#8217;t worry\u2014<a href=\"https:\/\/linuxiac.com\/how-to-install-aur-packages-in-arch-linux\/\">our guide covers you<\/a>.<\/p>\n\n\n\n<p>One more thing to keep in mind: since these kernels are available in the AUR, installing them means the process involves compilation. That requires a bit of patience, as the process can take some time, depending on the power of your hardware.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"Liquorix_Kernel_linux-lqx\">Liquorix Kernel (linux-lqx)<\/h3>\n\n\n\n<p><a href=\"https:\/\/liquorix.net\/\" target=\"_blank\" rel=\"noreferrer noopener\">Liquorix<\/a> is a highly optimized kernel (based on Zen) for desktop performance and responsiveness, including tweaks for gaming and multimedia. Best for gamers and desktop users looking for a snappier experience.<\/p>\n\n\n\n<p>Command to install it + header files:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">yay -S linux-lqx linux-lqx-headers<\/code><\/span><\/pre>\n\n\n<h3 class=\"wp-block-heading\" id=\"XanMod_Kernel_linux-xanmod\">XanMod Kernel (linux-xanmod)<\/h3>\n\n\n\n<p><a href=\"https:\/\/xanmod.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">XanMod<\/a> is another unofficial kernel optimized especially for desktop usage and high-performance computing experience. It includes patches and scheduler tweaks to reduce latency and improve responsiveness, making it great for gaming, multimedia, and heavy multitasking.<\/p>\n\n\n\n<p>Command to install it + header files:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-6\" data-shcb-language-name=\"Bash\" data-shcb-language-slug=\"bash\"><span><code class=\"hljs language-bash\">yay -S linux-xanmod linux-xanmod-headers<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-6\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Bash<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">bash<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h3 class=\"wp-block-heading\" id=\"Libre_Kernel_linux-libre\">Libre Kernel (linux-libre)<\/h3>\n\n\n\n<p>A version of the Linux kernel that removes all proprietary firmware and drivers, adhering strictly to free software principles. It&#8217;s best suited for software freedom advocates who wish to run a system entirely composed of open-source software.<\/p>\n\n\n\n<p>Command to install it + header files:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-7\" data-shcb-language-name=\"Bash\" data-shcb-language-slug=\"bash\"><span><code class=\"hljs language-bash\">yay -S linux-libre linux-libre-headers<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-7\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Bash<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">bash<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h3 class=\"wp-block-heading\" id=\"Clear_Linux_Kernel_linux-clear\">Clear Linux Kernel (linux-clear)<\/h3>\n\n\n\n<p>This kernel, originating from Intel&#8217;s Clear Linux Project, includes performance optimizations and patches for Intel hardware. It can improve performance for users with Intel CPUs who want to maximize performance, especially in compute-intensive tasks.<\/p>\n\n\n\n<p>Command to install it + header files:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-8\" data-shcb-language-name=\"Bash\" data-shcb-language-slug=\"bash\"><span><code class=\"hljs language-bash\">yay -S linux-clear linux-clear-headers<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-8\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Bash<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">bash<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h3 class=\"wp-block-heading\" id=\"CK_Kernel_linux-ck\">CK Kernel (linux-ck)<\/h3>\n\n\n\n<p>CK kernel features the MuQSS scheduler and other performance enhancements to improve system responsiveness under load. It is best for users who multitask heavily and want smoother performance during intense workloads.<\/p>\n\n\n\n<p>Command to install it + header files:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-9\" data-shcb-language-name=\"Bash\" data-shcb-language-slug=\"bash\"><span><code class=\"hljs language-bash\">yay -S linux-ck linux-ck-headers<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-9\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Bash<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">bash<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h2 class=\"wp-block-heading\" id=\"Switching_Between_Kernels_on_Arch_Linux\">Switching Between Kernels on Arch Linux<\/h2>\n\n\n\n<p>Okay, by running the following command, we\u2019ve added two extra Linux kernels, LTS and Zen, to our Arch system.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-10\" data-shcb-language-name=\"Bash\" data-shcb-language-slug=\"bash\"><span><code class=\"hljs language-bash\">sudo pacman -S linux-lts linux-zen<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-10\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Bash<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">bash<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>It&#8217;s important to remember that simply installing these kernels doesn\u2019t automatically make them ready to use on your system. To get your Arch box running with them, you\u2019ll need to make the bootloader aware of them.<\/p>\n\n\n\n<p>Not sure how to do it? Don\u2019t worry\u2014I\u2019ll walk you through the process for the two most common options: GRUB and systemd-boot.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"Switching_Kernels_with_GRUB\">Switching Kernels with GRUB<\/h3>\n\n\n\n<p>GRUB doesn\u2019t dynamically scan for new kernels each time you boot. Instead, it relies on a &#8220;<em>grub.cfg<\/em>&#8221; configuration file. To make it aware and use them during boot, you\u2019ll need to give it a little nudge. Thankfully, it\u2019s super simple.<\/p>\n\n\n\n<p>Just run the command below to regenerate the GRUB configuration file. This process scans the contents of the &#8220;<em>boot<\/em>&#8221; directory for new kernel images and associated initramfs files, then updates &#8220;<em>grub.cfg<\/em>&#8221; with new entries.<\/p>\n\n\n\n<p>When you reboot, GRUB reads from this updated configuration file and shows the newly installed kernels in its menu.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-11\" data-shcb-language-name=\"Bash\" data-shcb-language-slug=\"bash\"><span><code class=\"hljs language-bash\">sudo grub-mkconfig -o \/boot\/grub\/grub.cfg<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-11\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Bash<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">bash<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/linuxiac.com\/wp-content\/uploads\/2024\/12\/arch-kernels-01.jpg\"><img decoding=\"async\" width=\"1024\" height=\"447\" src=\"https:\/\/linuxiac.com\/wp-content\/uploads\/2024\/12\/arch-kernels-01-1024x447.jpg\" alt=\"Recreating GRUB configuration file.\" class=\"wp-image-146796\" srcset=\"https:\/\/linuxiac.com\/wp-content\/uploads\/2024\/12\/arch-kernels-01-1024x447.jpg 1024w, https:\/\/linuxiac.com\/wp-content\/uploads\/2024\/12\/arch-kernels-01-380x166.jpg 380w, https:\/\/linuxiac.com\/wp-content\/uploads\/2024\/12\/arch-kernels-01-768x335.jpg 768w, https:\/\/linuxiac.com\/wp-content\/uploads\/2024\/12\/arch-kernels-01.jpg 1031w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">Recreating GRUB configuration file.<\/figcaption><\/figure>\n\n\n\n<p>After rebooting, you&#8217;ll find the newly added kernels under the &#8220;<em>Advanced options for Arch Linux<\/em>&#8221; submenu GRUB section. Just use the arrow keys on your keyboard to navigate to it, then press &#8220;<em>Enter<\/em>&#8221; to access it.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/linuxiac.com\/wp-content\/uploads\/2024\/12\/arch-kernels-02.jpg\"><img decoding=\"async\" width=\"1024\" height=\"686\" src=\"https:\/\/linuxiac.com\/wp-content\/uploads\/2024\/12\/arch-kernels-02-1024x686.jpg\" alt=\"Starting Arch with a kernel other than the default one.\" class=\"wp-image-146802\" srcset=\"https:\/\/linuxiac.com\/wp-content\/uploads\/2024\/12\/arch-kernels-02-1024x686.jpg 1024w, https:\/\/linuxiac.com\/wp-content\/uploads\/2024\/12\/arch-kernels-02-380x255.jpg 380w, https:\/\/linuxiac.com\/wp-content\/uploads\/2024\/12\/arch-kernels-02-768x514.jpg 768w, https:\/\/linuxiac.com\/wp-content\/uploads\/2024\/12\/arch-kernels-02.jpg 1266w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">Starting Arch with a kernel other than the default one.<\/figcaption><\/figure>\n\n\n\n<p>Here, you\u2019ll see a list of the kernels you\u2019ve just installed\u2014like the LTS and Zen ones we set up earlier. Use the arrow keys on your keyboard to highlight the kernel you want your Arch system to boot with, then press &#8220;<em>Enter<\/em>.&#8221; And that&#8217;s all.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/linuxiac.com\/wp-content\/uploads\/2024\/12\/arch-kernels-03.jpg\"><img decoding=\"async\" width=\"1024\" height=\"686\" src=\"https:\/\/linuxiac.com\/wp-content\/uploads\/2024\/12\/arch-kernels-03-1024x686.jpg\" alt=\"Display a list of available Linux kernels.\" class=\"wp-image-146808\" srcset=\"https:\/\/linuxiac.com\/wp-content\/uploads\/2024\/12\/arch-kernels-03-1024x686.jpg 1024w, https:\/\/linuxiac.com\/wp-content\/uploads\/2024\/12\/arch-kernels-03-380x255.jpg 380w, https:\/\/linuxiac.com\/wp-content\/uploads\/2024\/12\/arch-kernels-03-768x514.jpg 768w, https:\/\/linuxiac.com\/wp-content\/uploads\/2024\/12\/arch-kernels-03.jpg 1266w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">Display a list of available Linux kernels.<\/figcaption><\/figure>\n\n\n\n<p>But let\u2019s make things a bit more user-friendly! I find it inconvenient to have a submenu in GRUB that I need to navigate just to see all the available kernel options. Instead, let\u2019s set it up so all the kernels are displayed right on the main screen. You&#8217;d be surprised how easy this is to achieve.<\/p>\n\n\n\n<p>Open the GRUB configuration file with your preferred terminal text editor:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-12\" data-shcb-language-name=\"Bash\" data-shcb-language-slug=\"bash\"><span><code class=\"hljs language-bash\">sudo nano \/etc\/default\/grub<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-12\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Bash<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">bash<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Change the &#8220;<em>GRUB_DEFAULT<\/em>&#8221; options from &#8220;<em>0<\/em>&#8221; to &#8220;<em>saved<\/em>.&#8221;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/linuxiac.com\/wp-content\/uploads\/2024\/12\/arch-kernels-04.jpg\"><img decoding=\"async\" width=\"993\" height=\"224\" src=\"https:\/\/linuxiac.com\/wp-content\/uploads\/2024\/12\/arch-kernels-04.jpg\" alt=\"Change default GRUB settings in Arch Linux.\" class=\"wp-image-146829\" srcset=\"https:\/\/linuxiac.com\/wp-content\/uploads\/2024\/12\/arch-kernels-04.jpg 993w, https:\/\/linuxiac.com\/wp-content\/uploads\/2024\/12\/arch-kernels-04-380x86.jpg 380w, https:\/\/linuxiac.com\/wp-content\/uploads\/2024\/12\/arch-kernels-04-768x173.jpg 768w\" sizes=\"(max-width: 993px) 100vw, 993px\" \/><\/a><figcaption class=\"wp-element-caption\">Change default GRUB settings in Arch Linux.<\/figcaption><\/figure>\n\n\n\n<p>Next, remove the &#8220;<em>#<\/em>&#8221; symbol at the start of the lines for &#8220;<em>GRUB_SAVEDEFAULT<\/em>&#8221; and &#8220;<em>GRUB_DISABLE_SUBMENU<\/em>&#8221; so that both options are uncommented.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/linuxiac.com\/wp-content\/uploads\/2024\/12\/arch-kernels-05.jpg\"><img decoding=\"async\" width=\"998\" height=\"623\" src=\"https:\/\/linuxiac.com\/wp-content\/uploads\/2024\/12\/arch-kernels-05.jpg\" alt=\"Change default GRUB settings in Arch Linux.\" class=\"wp-image-146832\" srcset=\"https:\/\/linuxiac.com\/wp-content\/uploads\/2024\/12\/arch-kernels-05.jpg 998w, https:\/\/linuxiac.com\/wp-content\/uploads\/2024\/12\/arch-kernels-05-380x237.jpg 380w, https:\/\/linuxiac.com\/wp-content\/uploads\/2024\/12\/arch-kernels-05-768x479.jpg 768w\" sizes=\"(max-width: 998px) 100vw, 998px\" \/><\/a><figcaption class=\"wp-element-caption\">Change default GRUB settings in Arch Linux.<\/figcaption><\/figure>\n\n\n\n<p>Finally, save the changes and recreate the &#8220;<em>grub.cfg<\/em>&#8221; file.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-13\" data-shcb-language-name=\"Bash\" data-shcb-language-slug=\"bash\"><span><code class=\"hljs language-bash\">sudo grub-mkconfig -o \/boot\/grub\/grub.cfg<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-13\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Bash<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">bash<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Reboot, and just like that, the magic happened. All your kernels are now conveniently displayed right on the main GRUB screen of your Arch system. Even better, the bootloader will remember the last kernel you used and automatically boot into it next time\u2014unless you decide to pick a different one from the list.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/linuxiac.com\/wp-content\/uploads\/2024\/12\/arch-kernels-06.jpg\"><img decoding=\"async\" width=\"1024\" height=\"679\" src=\"https:\/\/linuxiac.com\/wp-content\/uploads\/2024\/12\/arch-kernels-06-1024x679.jpg\" alt=\"Display a list of all available Linux kernels right on the main GRUB screen.\" class=\"wp-image-146841\" srcset=\"https:\/\/linuxiac.com\/wp-content\/uploads\/2024\/12\/arch-kernels-06-1024x679.jpg 1024w, https:\/\/linuxiac.com\/wp-content\/uploads\/2024\/12\/arch-kernels-06-380x252.jpg 380w, https:\/\/linuxiac.com\/wp-content\/uploads\/2024\/12\/arch-kernels-06-768x509.jpg 768w, https:\/\/linuxiac.com\/wp-content\/uploads\/2024\/12\/arch-kernels-06.jpg 1298w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">Display a list of all available Linux kernels right on the main GRUB screen.<\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"Switching_Kernels_with_systemd-boot\">Switching Kernels with systemd-boot<\/h3>\n\n\n\n<p><a href=\"https:\/\/wiki.archlinux.org\/title\/Systemd-boot\" target=\"_blank\" rel=\"noreferrer noopener\">Systemd-boot<\/a> is a lightweight bootloader that integrates seamlessly with Arch Linux and UEFI systems. Switching between kernels using systemd-boot involves installing the desired kernels and configuring the bootloader entries.<\/p>\n\n\n\n<p>We assume you\u2019ve already taken care of the first part, installing the additional kernels. Now, let\u2019s walk you through setting up systemd-boot to boot your system with them.<\/p>\n\n\n\n<p>Verify if the respective new kernels and initramfs images have been generated in the &#8220;<em>\/boot<\/em>&#8221; directory:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/linuxiac.com\/wp-content\/uploads\/2024\/12\/arch-kernels-08.jpg\"><img decoding=\"async\" width=\"1024\" height=\"398\" src=\"https:\/\/linuxiac.com\/wp-content\/uploads\/2024\/12\/arch-kernels-08-1024x398.jpg\" alt=\"Listing content of the \/boot directory.\" class=\"wp-image-146919\" srcset=\"https:\/\/linuxiac.com\/wp-content\/uploads\/2024\/12\/arch-kernels-08-1024x398.jpg 1024w, https:\/\/linuxiac.com\/wp-content\/uploads\/2024\/12\/arch-kernels-08-380x148.jpg 380w, https:\/\/linuxiac.com\/wp-content\/uploads\/2024\/12\/arch-kernels-08-768x299.jpg 768w, https:\/\/linuxiac.com\/wp-content\/uploads\/2024\/12\/arch-kernels-08.jpg 1029w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">Listing content of the \/boot directory.<\/figcaption><\/figure>\n\n\n\n<p>Great! As you can see, our extra LTS and Zen kernels have also generated the necessary files in the &#8220;\/boot&#8221; directory alongside the main Arch kernel.<\/p>\n\n\n\n<p>Since you&#8217;re using systemd-boot, I&#8217;m guessing you&#8217;re already familiar with its basics\u2014but just in case, let me give you a quick refresher. Each kernel needs its own entry in &#8220;<em>\/boot\/loader\/entries\/<\/em>&#8221; (if &#8220;<em>\/boot<\/em>&#8221; is your ESP (EFI System Partition) mount point\u2014which is usually the most common case). These files define how the systemd-boot handles each kernel.<\/p>\n\n\n\n<p>Next, for every additional kernel you install, you must manually create an entry inside the &#8220;<em>\/boot\/loader\/entries\/<\/em>&#8221; directory, which is just a simple configuration file. Its name can be whatever you want; the mandatory condition is that the file has a &#8220;<em>.conf<\/em>&#8221; extension. Let&#8217;s do it for the LTS kernel.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-14\" data-shcb-language-name=\"Bash\" data-shcb-language-slug=\"bash\"><span><code class=\"hljs language-bash\">sudo nano \/boot\/loader\/entries\/arch-lts.conf<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-14\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Bash<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">bash<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>And put the following content in it:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-15\" data-shcb-language-name=\"Bash\" data-shcb-language-slug=\"bash\"><span><code class=\"hljs language-bash\">title Arch Linux LTS\nlinux \/vmlinuz-linux-lts\ninitrd \/initramfs-linux-lts.img\noptions root=UUID=45d61aea-cda7-4e55-a5f5-32ab4518a6dd rw<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-15\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Bash<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">bash<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Of course, you must replace the &#8220;<em>45d61aea-cda7-4e55-a5f5-32ab4518a6dd<\/em>&#8221; part with the UUID of your root (<em>&#8220;\/&#8221;<\/em>) filesystem. You can find it using:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">lsblk -o NAME,UUID,FSTYPE,MOUNTPOINT<\/code><\/span><\/pre>\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/linuxiac.com\/wp-content\/uploads\/2024\/12\/arch-kernels-09.jpg\"><img decoding=\"async\" width=\"939\" height=\"224\" src=\"https:\/\/linuxiac.com\/wp-content\/uploads\/2024\/12\/arch-kernels-09.jpg\" alt=\"Find partitions' UUID.\" class=\"wp-image-146931\" srcset=\"https:\/\/linuxiac.com\/wp-content\/uploads\/2024\/12\/arch-kernels-09.jpg 939w, https:\/\/linuxiac.com\/wp-content\/uploads\/2024\/12\/arch-kernels-09-380x91.jpg 380w, https:\/\/linuxiac.com\/wp-content\/uploads\/2024\/12\/arch-kernels-09-768x183.jpg 768w\" sizes=\"(max-width: 939px) 100vw, 939px\" \/><\/a><figcaption class=\"wp-element-caption\">Find partitions&#8217; UUID.<\/figcaption><\/figure>\n\n\n\n<p>Additionally, if using Intel or AMD CPUs, include the microcode initrd (if you have already installed it and have the corresponding file available in &#8220;<em>\/boot<\/em>&#8220;) before the main initramfs. For example:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-16\" data-shcb-language-name=\"Bash\" data-shcb-language-slug=\"bash\"><span><code class=\"hljs language-bash\">title Arch Linux LTS\nlinux \/vmlinuz-linux-lts\ninitrd \/amd-ucode.img\ninitrd \/initramfs-linux-lts.img\noptions root=UUID=45d61aea-cda7-4e55-a5f5-32ab4518a6dd rw<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-16\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Bash<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">bash<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>That&#8217;s it! Save the file and exit. Finally, let\u2019s quickly double-check to ensure everything looks good.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-17\" data-shcb-language-name=\"Bash\" data-shcb-language-slug=\"bash\"><span><code class=\"hljs language-bash\">bootctl list<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-17\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Bash<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">bash<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/linuxiac.com\/wp-content\/uploads\/2024\/12\/arch-kernels-11.jpg\"><img decoding=\"async\" width=\"1024\" height=\"547\" src=\"https:\/\/linuxiac.com\/wp-content\/uploads\/2024\/12\/arch-kernels-11-1024x547.jpg\" alt=\"Verifying systemd-boot\u2019s entries on Arch Linux.\" class=\"wp-image-146946\" srcset=\"https:\/\/linuxiac.com\/wp-content\/uploads\/2024\/12\/arch-kernels-11-1024x547.jpg 1024w, https:\/\/linuxiac.com\/wp-content\/uploads\/2024\/12\/arch-kernels-11-380x203.jpg 380w, https:\/\/linuxiac.com\/wp-content\/uploads\/2024\/12\/arch-kernels-11-768x410.jpg 768w, https:\/\/linuxiac.com\/wp-content\/uploads\/2024\/12\/arch-kernels-11.jpg 1084w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">Verifying systemd-boot&#8217;s entries on Arch Linux.<\/figcaption><\/figure>\n\n\n\n<p>We&#8217;re all set. Reboot the system:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-18\" data-shcb-language-name=\"Bash\" data-shcb-language-slug=\"bash\"><span><code class=\"hljs language-bash\">sudo reboot<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-18\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Bash<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">bash<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>The newly added &#8220;<em>Arch Linux LTS<\/em>&#8221; should now be available in the systemd-boot menu. Highlight it and hit &#8220;<em>Enter<\/em>&#8221; to boot your Arch system with the LTS kernel.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/linuxiac.com\/wp-content\/uploads\/2024\/12\/arch-kernels-12.jpg\"><img decoding=\"async\" width=\"899\" height=\"201\" src=\"https:\/\/linuxiac.com\/wp-content\/uploads\/2024\/12\/arch-kernels-12.jpg\" alt=\"systemd-bood menu\" class=\"wp-image-146952\" srcset=\"https:\/\/linuxiac.com\/wp-content\/uploads\/2024\/12\/arch-kernels-12.jpg 899w, https:\/\/linuxiac.com\/wp-content\/uploads\/2024\/12\/arch-kernels-12-380x85.jpg 380w, https:\/\/linuxiac.com\/wp-content\/uploads\/2024\/12\/arch-kernels-12-768x172.jpg 768w\" sizes=\"(max-width: 899px) 100vw, 899px\" \/><\/a><figcaption class=\"wp-element-caption\">systemd-bood menu<\/figcaption><\/figure>\n\n\n\n<p>Finally, here\u2019s a handy little trick to make your life easier: you can set systemd-boot to remember the last kernel you booted into, so you don\u2019t have to pick it from the boot menu every time. Just open the &#8220;<em>\/boot\/loader\/loader.conf<\/em>&#8221; file and set the &#8220;<em>default<\/em>&#8221; option to &#8220;<em>@saved<\/em>.&#8221;<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-19\" data-shcb-language-name=\"Bash\" data-shcb-language-slug=\"bash\"><span><code class=\"hljs language-bash\">sudo nano \/boot\/loader\/loader.conf<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-19\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Bash<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">bash<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/linuxiac.com\/wp-content\/uploads\/2024\/12\/arch-kernels-13.jpg\"><img decoding=\"async\" width=\"973\" height=\"304\" src=\"https:\/\/linuxiac.com\/wp-content\/uploads\/2024\/12\/arch-kernels-13.jpg\" alt=\"Tell systemd-boot to remember the last booting kernel.\" class=\"wp-image-146967\" srcset=\"https:\/\/linuxiac.com\/wp-content\/uploads\/2024\/12\/arch-kernels-13.jpg 973w, https:\/\/linuxiac.com\/wp-content\/uploads\/2024\/12\/arch-kernels-13-380x119.jpg 380w, https:\/\/linuxiac.com\/wp-content\/uploads\/2024\/12\/arch-kernels-13-768x240.jpg 768w\" sizes=\"(max-width: 973px) 100vw, 973px\" \/><\/a><figcaption class=\"wp-element-caption\">Tell systemd-boot to remember the last booting kernel.<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"Conclusion\">Conclusion<\/h2>\n\n\n\n<p>That&#8217;s all from me for now, folks. You\u2019ve just taken another step toward unlocking Arch Linux&#8217;s full potential. The ability to install and switch between different kernels empowers you to fine-tune your system for performance, stability, or cutting-edge features\u2014whatever best suits your needs.<\/p>\n\n\n\n<p>So, reboot into your kernel of choice and keep exploring everything Arch has to offer\u2014your system, your way.<\/p>\n\n\n\n<p>If you have any questions or feedback, feel free to reach out in the comment section below. Happy Arching!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Learn how to unlock Arch&#8217;s full potential by installing and switching between different Linux kernels with our guide.<\/p>\n","protected":false},"author":10,"featured_media":146193,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,4417],"tags":[4264,40],"class_list":["post-146190","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tips","category-linux-knowledge","tag-arch-linux","tag-kernel"],"blocksy_meta":[],"_links":{"self":[{"href":"https:\/\/linuxiac.com\/wp-json\/wp\/v2\/posts\/146190","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxiac.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxiac.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxiac.com\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxiac.com\/wp-json\/wp\/v2\/comments?post=146190"}],"version-history":[{"count":0,"href":"https:\/\/linuxiac.com\/wp-json\/wp\/v2\/posts\/146190\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxiac.com\/wp-json\/wp\/v2\/media\/146193"}],"wp:attachment":[{"href":"https:\/\/linuxiac.com\/wp-json\/wp\/v2\/media?parent=146190"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxiac.com\/wp-json\/wp\/v2\/categories?post=146190"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxiac.com\/wp-json\/wp\/v2\/tags?post=146190"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}