Most Linux graphical installation come with the GRUB boot menu displaying at startup. The GRUB Linux's default bootloader with options to boot Linux or other operating systems, and advanced features like the recovery console. Though most users don't mind that the GRUB menu is present, hiding it for sure increases your boot time by a few seconds. You don't have to wait for the 10-second timeout or press the Enter key. In this article, we'll be learning how to hide the GRUB boot menu from your GNU/Linux installation.
To hide GRUB, we need to edit the configuration file, but first we need to backup our configuration file using this command:
$ sudo cp /etc/default/grub /etc/default/grub.bkp
Now that we've created the backup, let's edit the values of the grub configuration file to leave the grub menu hidden at startup. Use the command below to edit grub.
$ sudo gedit /etc/default/grub
You'll find something like in the screenshot below.
Now, we will change the line GRUB_TIMEOUT = 10 to GRUB_TIMEOUT = 0 and add the line GRUB_DISABLE_OS_PROBER = true. You should have your text file looking like this:
GRUB_DEFAULT = 0 GRUB_TIMEOUT = 0 GRUB_DISABLE_OS_PROBER = true GRUB_DISTRIBUTOR = `lsb_release -i -s 2> / dev / null || Echo Debian` GRUB_CMDLINE_LINUX_DEFAULT = "quiet splash" GRUB_CMDLINE_LINUX = ""
Press Ctrl + S to save the file and close the text editor. But note that, nothing will change until you reboot. Now that you've successfully updated your GRUB settings, update it by typing this command.
$ sudo update-grub
Rolling Back Changes
Just in case you want to revert to the default GRUB boot menu, you can either change the values back to the default or restore the original backup file. You can do this with the following commands.
$ sudo cp /etc/default/grub.bkp /etc/default/grub $ sudo update-grub
In this guide, we learned how to hide the GRUB boot menu on startup. This enables you to boot up faster and get rid of the annoying boot screen.