How to Hide Grub Boot Menu in Ubuntu 20.04 LTS

June 8, 2020 — 5 Comments

This tutorial shows how to hide / disable the Grub boot menu while booting up.

You can do the job easily via Grub-Customizer (available in Ubuntu Software) under General Settings tab. However, you need to also disable “look for other operating systems” option.

Any time you want to show the Grub menu, press ESC while booting up will NO longer show dual-boot (multi-boot) systems other than Ubuntu.

NOT OK with Grub-Customizer settings? Re-enable “show menu” and “look for other operating systems” options, save changes, and do following steps one by one.

1.) Show or hide the boot menu relies on the values of ‘GRUB_TIMEOUT_STYLE’ and ‘GRUB_TIMEOUT’. However, the two values in /etc/default/grub does not work!

It’s because /etc/grub.d/30_os-prober overrides them by setting timeout to 10 (if it’s 0 in /etc/default/grub) and always to display menu.

Open terminal (Ctrl+Alt+T) and run command to edit the configuration file:

sudo -H gedit /etc/grub.d/30_os-prober

Type user password (no asterisk feedback) for sudo prompt.
When the file opens, disable the last line by adding # in the beginning. So it will be:

#adjust_timeout

2.) Now edit the /etc/default/grub file via command:

sudo -H gedit /etc/default/grub

When the file opens, change the values:

  • set GRUB_TIMEOUT_STYLE to “hidden” or “countdown
  • set GRUB_TIMEOUT to “0”
Actually, set GRUB_TIMEOUT to “1” will boot faster! Tested in “countdown” mode, while value “0” still counts 3,2,1,0, value “1” will count 1,0.

3.) Finally apply changes via command:

sudo update-grub

How to restore:

To restore the changes, simply run command in step 1), then re-enable the last line by removing # so it will be:

adjust_timeout

And apply change by running command sudo update-grub.

I'm a freelance blogger who started using Ubuntu in 2007 and wish to share my experiences and some useful tips with Ubuntu beginners and lovers. Please notify me if you find any typo/grammar/language mistakes. English is not my native language. Contact me via [email protected]

5 responses to How to Hide Grub Boot Menu in Ubuntu 20.04 LTS

  1. an old friend July 7, 2020 at 8:25 pm

    Hey Ji m, there is an even easier solution…

    sudo nano /etc/default/grub

    add this line to your grub file:

    GRUB_RECORDFAIL_TIMEOUT=0

    sudo update-grub

    Done!

    • Bart (Poland) July 20, 2020 at 8:40 pm

      Big thanks. I couldn’t cope with it. As long as I had a “dual boot” (with M $) everything worked, but a week ago I deleted all the partitions from Bill and despite the correct settings in GRUB – this one was still counting 30 seconds. Thanks again.

    • This was the only thing to work and took awhile to find, thanks!
      I hate when they change stuff like this. Worse yet, make it look like you can change it in one setting but hey gotcha, we got hidden code behind the scenes that nullifys your expectations…

    • I have installed Ubuntu 20.04 as sole OS on a fresh HD and got stuck with a 30 second grub menu. The changes suggested in steps 1-3 did not change it, but adding the RECORDFAIL line did it for me. Thank you!

  2. perfect! thank you very much!

Leave a Reply

Text formatting is available via select HTML.

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> 

*