How to Hide Grub Menu in Boot of your Linux Machine

hide grub linuxMost 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.

Hiding GRUB

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.

About Eyram Amedzor

Kwaku Eyram has been a working with computers and software for more than 10 years. He's an all-round geek and very fluid with Linux, Android and Windows operating systems. Asides being a tech enthusiast, Kwaku doubles as a tech support personnel and a tech writer. He currently has interest in IoT, web development and information security.

Author Archive Page

Have anything to say?

Your email address will not be published. Required fields are marked *

All comments are subject to moderation.

1 Comment

  1. I use grub-customizer. It has a gui to easily do all the tweaks. I multi-boot so I need to see a grub screen, and the regular one is ugly.