This post was originally published on go2linux.org. The domain is no longer mine, but I am the original author. I am republishing it here on garron.me with corrections and improvements.

When you have multiple operating systems installed, the GRUB bootloader shows a menu at startup. By default the timeout is short enough that you can easily miss it. This guide shows how to change it on modern Linux systems using GRUB2.

Note: This guide covers GRUB2, the bootloader used by all modern Linux distributions (Debian, Ubuntu, Fedora, Arch, and others). The old GRUB Legacy used /boot/grub/menu.lst, which no longer exists on current systems.

The configuration file

GRUB2 configuration is split in two:

  • /etc/default/grub — where you set your options (edit this file)
  • /boot/grub/grub.cfg — the generated config (never edit this directly)

Change the timeout

Open /etc/default/grub with your editor:

sudo nano /etc/default/grub

Find the line:

GRUB_TIMEOUT=5

Change the value to the number of seconds you want. For example, 15 seconds:

GRUB_TIMEOUT=15

Set it to 0 to skip the menu entirely and boot immediately. Set it to -1 to wait indefinitely until you make a selection.

Menu display style

The GRUB_TIMEOUT_STYLE option controls how the countdown behaves:

GRUB_TIMEOUT_STYLE=menu
Value Behavior
menu Shows the full menu and counts down
countdown Hides the menu but shows a countdown; press any key to show it
hidden Boots silently with no countdown; press Shift or Esc to show the menu

If you want the menu visible every time, make sure GRUB_TIMEOUT_STYLE=menu is set.

Apply the change

After editing /etc/default/grub, regenerate the GRUB configuration.

On Debian and Ubuntu:

sudo update-grub

On Fedora, RHEL, and Arch:

sudo grub2-mkconfig -o /boot/grub2/grub.cfg

On UEFI systems with Fedora/RHEL:

sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg

Verify the change

Check that the generated config picked up your setting:

grep "set timeout" /boot/grub/grub.cfg

You should see the value you set. Reboot to confirm the menu appears with the new countdown.

Example: full /etc/default/grub for a dual-boot system

GRUB_DEFAULT=0
GRUB_TIMEOUT=15
GRUB_TIMEOUT_STYLE=menu
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

GRUB_DEFAULT=0 boots the first entry by default. Set it to saved to always boot the last OS you selected.