Ubuntu – How to disable grub menu at boot time in Ubuntu 20.04


I have installed Ubuntu 20.04 alongside Windows. When I boot the system, it shows the grub menu for 10 seconds to choose between Ubuntu and Windows. I don't want that menu, just want to boot it up right after pressing the power button. I have looked into this thread and added GRUB_HIDDEN_TIMEOUT_QUIET=true
and even changed GRUB_TIMEOUT to 0 and then ran sudo update-grub. But it didn't work, menu is still being shown at boot time. This is my /etc/default/grub file-

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)

# Uncomment to disable graphical terminal (grub-pc only)

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux

# Uncomment to disable generation of recovery mode menu entries

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"

How do I disable it?

Best Answer

  • Tested with Dual boot of 2 Ubuntu 20.04 OS'es

    Edit the below line in the file /etc/default/grub file


    like this


    and run the below command

    sudo update-grub

    this makes the timeout to 0 with condition that if there is Single OS it will stick to 0 otherwise it will be overwrite to 10.

    In the /etc/grub.d/30_os-prober file, change the line




    This will prevent in multi OS'es cases from changing the timeout value to 10seconds..

    see the function "adjust_timeout" from the file /etc/grub.d/30_os-prober

    export TEXTDOMAIN=grub
    export TEXTDOMAINDIR="${datarootdir}/locale"
    . "$pkgdatadir/grub-mkconfig_lib"
    adjust_timeout () {
      if [ "$quick_boot" = 1 ] && [ "x${found_other_os}" != "x" ]; then
        cat << EOF
    set timeout_style=menu
    if [ "\${timeout}" = 0 ]; then
      set timeout=10

    When you want to see grub menu, pressing the Esc key at rite time will show you. (rite time varies based on conditions, generally after the BIOS menu hand overs to grub menu time)

    In case if you wish to change Default OS, you can set from the same file /etc/default/grub.

    for the first time, get to the grub menu by hitting Esc at the rite time. Then count the number starting from 0 from top to list your favorite OS Entry..

    For example, I have two 20.04 OS'es.. one in /dev/sda2 and other in /dev/sda6 /dev/sda2 is the default one. If I want to make the one in /dev/sda6 as the default OS, I need to find its number like below..

    enter image description here

    So, its position is at number 2.

    Edit the file /etc/default/grub and change the line




    then run the below command

    sudo update-grub

    System will boot straight to Ubuntu 20.04 on /dev/sda6