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”
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
.