GRUB (GNU GRand Unified Bootloader) is a boot loader from the GNU Project that loads the Linux kernel. It is also responsible for displaying an options menu from which you can pick the operating system you want to boot into.
However, the default view of the GRUB boot loader is not that appealing. And that’s perfectly normal, given that the main focus here is on functionality. Namely, to load your operating system seamlessly.
Fortunately, in the tradition of open source software, the GRUB developers have provided the ability to apply themes to it, which can radically change how it looks. This, in turn, leads to a much better user experience.
You may have noticed that many Linux distributions include a pre-modified GRUB boot loader, which gives the end user a much more unified experience. The good news is that you, too, can change the appearance of GRUB with no effort. Let us show you how.
How to Change Your GRUB Theme
Letโs look at how to change the GRUB theme of the Linux distro youโre using. First, of course, that requires, well, a GRUB theme. Fortunately, there are many ready-made ones available on the Internet. For example, the Gorgeous-GRUB page on GitHub has a nice collection of selected ones.
However, when writing this article, we decided that the best approach to show how to apply a theme to the GRUB boot loader would be to create our own for demonstration purposes.
Our graphic designer was kind enough to respond to our request, so we are pleased to offer you our new GRUB theme – Linuxiac. In the image below, you can see it in action and download it for free by clicking the button.
After downloading the theme from the button above, just unzip it and move the resulting folder to the /boot/grub/themes
directory on your Linux system.
sudo mv linuxiac/ /boot/grub/themes/
Code language: JavaScript (javascript)
You should now have a subdirectory named after the theme in the /boot/grub/themes
directory.
There are a few minor settings to instruct the GRUB boot loader to use the new theme. But first, we’ll need to know our monitor’s resolution. This is simple to accomplish with the following command:
xdpyinfo | awk '/dimensions/ {print $2}'
Code language: JavaScript (javascript)
The xdpyinfo
tool displays information about an X server on Linux and Unix systems. Of course, the resolution in your case may differ, for example, 1920×1080, 1536×864, 1366×768, and so on.
Now let’s configure a few settings. First, open the grub
file in the /etc/default directory
using your preferred text editor.
sudo vim /etc/default/grub
Code language: JavaScript (javascript)
Find the line containing the GRUB_GFXMODE
option and set the value to your monitor’s resolution, which we got just above.
Then, find the GRUB_THEME
line and specify the full path to the theme configuration file, theme.txt
.
Save your changes and exit the editor. Finally, we must recreate the GRUB configuration file for the changes to take effect. This is done by executing the following command:
sudo grub-mkconfig -o /boot/grub/grub.cfg
After rebooting your Linux system, you should be greeted by your new GRUB theme.
That’s all. You now know how to apply themes to the GRUB boot loader. We hope we were helpful and that you enjoyed our GRUB theme.
You can examine the /boot/grub/themes/linuxiac/theme.txt
file for further information on the theme’s options. Furthermore, if you want to learn more about creating GRUB themes, Rosalab Wiki has two detailed articles on the subject, “GRUB2 Theme Tutorial” and “GRUB2 Theme Reference.”
Finally, we’ll highlight that the processes outlined above can also be accomplished using a softer, such as Grub Customizer. Still, we don’t recommend it because it keeps many things hidden from you behind the scene.
Furthermore, there is always the chance that the software can corrupt anything on your system, which might have severe consequences in the case of GRUB.