This tutorial shows how to easily change the GRUB timeout in Linux. After reading this tutorial, you’ll know how to edit the Grub timeout in a few steps.

Before starting, if when you boot your computer, GRUB doesn’t show up, jump to the What to do if GRUB menu doesn’t show up section.

Changing GRUB timeout in Linux:

To begin, edit GRUB’s configuration file. You can use the command below to edit it using the nano text editor.

sudo nano /etc/default/grub

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/08/echo/word-image-402.png" data-lazy- height="177" src="data:image/svg xml,” width=”764″>

Find the line containing “GRUB TIMEOUT=5” shown in the following screenshot; in my case (Debian), it is the second uncommented line.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/08/echo/word-image-403.png" data-lazy- height="699" src="data:image/svg xml,” width=”1228″>

This is the line you need to edit to change the GRUB timeout; just replace the default 5 with another value; for example, to change the timeout from 5 seconds to 10 seconds, edit the following line.

And leave it as

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/08/echo/word-image-404.png" data-lazy- height="487" src="data:image/svg xml,” width=”882″>

Once you edit the line, exit nano saving changes by pressing Ctrl X and update-grub to apply changes, to update Grub, run the command below.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/08/echo/word-image-405.png" data-lazy- height="403" src="data:image/svg xml,” width=”1022″>

Now when you reboot your computer, you’ll see the new timeout.

What to do if the GRUB menu doesn’t show up:

If the GRUB menu doesn’t show up when you boot your computer, it may be hidden. If you are using Legacy BIOS, you can display it by pressing the Shift key several times when booting. If you use UEFI, then press Esc. This will show the GRUB menu one time.

In my Ubuntu device, when checking GRUB’s configuration file /etc/default/grub, an additional line hides the GRUB menu. To show GRUB’s menu permanently, the following line:

GRUB_TIMEOUT_STYLE=hidden

Must be changed as shown in the screenshot below to:

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/08/echo/word-image-406.png" data-lazy- height="349" src="data:image/svg xml,” width=”553″>

Then, you can edit the previously mentioned line to change the timeout. For example, to change the timeout from 5 seconds to 10 seconds, edit the following line.

And change it to:

Then close nano saving changes (Ctrl X).

Now you need GRUB to apply the changes you made. For this, you need to update GRUB. To update GRUB, run the following command.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/08/echo/word-image-407.png" data-lazy- height="278" src="data:image/svg xml,” width=”491″>

When you reboot, the GRUB menu will stay for 10 seconds, or the number you defined in the line containing GRUB_TIMEOUT=.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/08/echo/word-image-408.png" data-lazy- height="461" src="data:image/svg xml,” width=”618″>

As you can see, now GRUB gives 10 seconds to choose an option or boot automatically.

What is GRUB, and how it works:

GRUB (Grand Unified Bootloader) is a bootloader that allows the user to choose the kernel, OS, or boot mode. Since the BIOS does not recognize file systems, this task is passed to the bootloader, which loads the files into RAM.

Grub is the first program that runs when the user turns on his computer. The bootloader task is to boot the correct operating system or kernel previous to system initialization.

In this case, the bootloader, or GRUB, is located in the MBR (Master Boot Record). The MBR is a hard disk or partition sector containing information on file systems and partitions, as well as the bootloader. Grub is also compatible with BSD systems (FreeBSD, NetBSD, OpenBSD); other kernels are supported through chain loading.

You can get additional information on GRUB at https://www.gnu.org/software/grub/ or https://www.gnu.org/software/grub/manual/grub/grub.html.

Conclusion:

As you can see, any Linux user level can easily edit GRUB’s timeout. Managing GRUB is pretty easy, and the most common mistake is to forget to update it after changes. Other known bootloaders are BURG (Brand-new Universal Loader from GRUB), LILO (Linux Loader), and Syslinux.

I hope this article explaining how to change the GRUB timeout in Linux was useful. Keep following Linux Hint for additional Linux tips and tutorials.

About the author

<img alt="" data-del="avatar" data-lazy-src="https://kirelos.com/wp-content/uploads/2021/08/echo/linuxinstitute_icono-150×150.png611810c396caa.jpg" height="112" src="data:image/svg xml,” width=”112″>

David Adams

David Adams is a System Admin and writer that is focused on open source technologies, security software, and computer systems.