To change your grub theme you need: #
- Grub Installed
- A terminal based text editor like vim or nano(For Convenience)
Things to know #
What is a grub Theme? #
Grub is what you see when you boot up your linux computer and see a menu, a theme will allow us to control how this menu looks. If you don’t get a grub menu when you boot up your computer, you can hold shift or escape as you computer is booting to see it.
RHEL based Distros #
grub behaves different on rhel based distros such as
- Rocky Linux
- Alma Linux
- Fedora
In such a way the /boot directory does not always persist so you can try and use this guide if you are using any of the above. But keep in mind this guide is made for Arch and Debian/Ubuntu based distros.
grub2 #
this tutorial uses the grub command which on most distros is grub2 but on some distros instead of typing grub you might have to chnge grub to grub2 in this guide.
Install a Text editor #
# on arch(vim)
sudo pacman -S --needed vim
# on arch(nano)
sudo pacman -S --needed nano
# on debian/ubuntu(nano)
sudo apt install vim
# on debian/ubuntu(vim)
sudo apt install nano
Theme #
Now time to choose and download a grub theme, my choice is the Shodan Theme
Place the theme #
You should put it in the /boot/grub/themes/ directory. If you don’t have it you can create it with this command.
sudo mkdir /boot/grub/themes
Then place the theme folder in that directory.
Editing the grub config file #
The grub config is usually at /boot/grub/grub.cfg. But that’s not the one that you want to edit. Thats is at /etc/default/grub, so we use the command
sudo <text editor of choice> /etc/default/grub
You should see a line that looks like this
GRUB-THEME=""
There might be something inbetween the quotes. If you don’t see it you can add it in.
Then you want to chnage this so it looks like this
GRUB-THEME="/boot/grub/themes/<name of theme directory>/theme.txt"
Then save and exit the file.
Applying the changes #
To do this run
sudo grub-mkconfig -o /boot/grub/grub.cfg
You can now reboot and take a look at the new theme.