How to customize the loading time of the GRUB bootloader?

I recently started using Endeavour OS and, among other things, noticed that the default time set for the GRUB bootloader is 5 seconds. This setting is good if you have multiple distributions on your system so you can choose which one to boot. But, I don’t have any other Linux distribution installed and the extra 5 seconds increase my boot time. I can disable it without any problems. Let’s see how you can change the loading time for GRUB.

What is GRUB?

It stands for Grand Unified Bootloader. It is simply a program that manages the boot process of your system. It starts the Kernel of the OS, and then the Kernel manages the startup of all other important software programs. Nowadays, GRUB 2 is used in the majority of Linux distributions.

It can also be used to boot into different kernels in the same operating system. It is easily customizable, you can change the font of the text, background screen, and many more things by editing the configuration files.

Editing the grub.config file

Open a Terminal window on your desktop and open the config file in your favorite text editor by typing the following command :

# For vim users
sudo vim /etc/default/grub

# For nano users
sudo nano /etc/default/grub
Editing The Config File
Editing The Config File

If you are using the vim editor, then press ‘I’ on your keyboard to enter the Insert mode, now look for the line which says GRUB TIMEOUT=N (Where N is the number of seconds).

Now, if the line is absent in your config file then simply add it, otherwise edit the line like this :

Edit The Value To Reduce Or Increase Grub Menu Time
Edit The Value To Reduce Or Increase Grub Menu Time

If you are increasing the Timeout for the menu, make sure that GRUB_TIMEOUT_STYLE is set to the menu in the above config file.

Once you have edited the file, you can save and exit in the nano editor by pressing Ctrl+O and Ctrl+X respectively. If you use the vim editor, then you can press the Escape key and then type :wq to exit.

Now, type the following in the Terminal to update the changes we have made :

sudo update-grub
Run An Update So That Changes Weve Made Takes Effect
Run An Update So That the Changes We’ve Made Takes Effect

Summary

You will see the recent changes we have made the next time you will boot into your system. This bootloader is supported on many other UNIX-like systems such as FreeBSD, NetBSD, and OpenBSD, so all the configuration procedure mentioned above is also applicable on those systems.

References

ArchWiki on GRUB