How to change the GRUB menu timeout at boot?

Many times because of the fast boot, we couldn’t see the Grub menu at the time of boot. Thus if you want to access it temporarily or increase the Grub menu time, so that we can access it, here is the tutorial.

Get to the GRUB menu at boot time

To make the Grub menu to appear permanently at the time of boot, we have to edit the Grub file, however, there is one temporary solution for that using the keyboard key.

View the Grub menu using the keyboard Shift key (temporary)

  • Restart your Linux PC such as Ubuntu or any other you are using.
  • Press and hold the Shift key while the system is getting the boot.
  • You will see the Grub menu, however, the shift key works for the Linux system running on Legacy BIOS booting.
  • For Linux system booted using UEFI, for example, the latest Ubuntu 20.04, instead of using the shift key, press the Esc, when the system gets booted.
  • In a few seconds, the Grub menu will appear to select various options such as Advance and recovery.

If you always want to see the Grub menu without using any keyboard keys, follow the below method.

  • Switch on your Linux system.
  • Open a command terminal.
  • Edit Grub file using the command: sudo nano /etc/default/grub file
  • Now either type “#” symbol at the starting of the line GRUB_TIMEOUT_STYLE=hidden or simply replace the hidden value with menuas shown in the screenshot.
  • Second, change the value of GRUB_TIMEOUT=0. Replace 0 with 25.
  • To save the file press CTRL+O and then CTRL+X to exit.
  • To reflect the changes, update the grub by running:  sudo update-grub to apply changes.
  • Output for the above command:
    h2s@h2smedia:~$ sudo update-grub
    [sudo] password for h2s:
    Sourcing file `/etc/default/grub'
    Sourcing file `/etc/default/grub.d/init-select.cfg'
    Generating grub configuration file ...
    Found linux image: /boot/vmlinuz-5.4.0-28-generic
    Found initrd image: /boot/initrd.img-5.4.0-28-generic
    done
  • Finally, reboot the system to see the Grub menu.
Show GRUB menu at boot time in Ubuntu
Show GRUB menu at boot time in Ubuntu

 

3 thoughts on “How to change the GRUB menu timeout at boot?”

  1. 6-12-2022
    I have dual boot win10 and Linux mint cinnamon 2.3. Everything runs fine no problem. Except the annoying grub menu that doesn’t give enough time. I wish I could disable it, just stays there until I’m ready to choose.
    After searching so far, this is the only command that opens the correct grub menu.
    After done with the changing, recheck what I did, and saving, it won’t exit with the command CTRL+X
    I tried (replace the hidden value with menu, or type “#” symbol at the starting of the line GRUB_TIMEOUT_STYLE=hidden), Still it won’t exit.
    Closing it will terminate all the changing.
    Maria

    Reply
  2. Hi I see your comment is from quite some time ago so maybe you already solved the problem. Nevertheless I here are some hints that may help you:
    First: the files “/etc/default/grub” and “/boot/grub/grub.cfg” are not editable without root access. So you have to open them as root (in terminal for instance with: sudo nano /etc/default/grub).
    Second: you do not need to edit “/boot/grub/grub.cfg” as it will be generated from the changes you may have made in “/etc/default/grub”.
    Third: Generate the “/boot/grub/grub.cfg” using the terminal command: “sudo grub-mkconfig”.
    If you do this you may find that the changes you made in “/etc/default/grub” will be activated.

    Reply
  3. And another tip may be to type this in a terminal window: “info -f grub -n ‘Simple configuration’ ” (a hint I found in the top comment lines in the “/etc/default/grub” file myself). I found the info I discussed in my previous comment mainly in there. After all, at 62 years of age I switched from Windows to Linux only a year ago and certainly do not know everything there is to know about Linux myself.

    Reply

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.