Edit Grub timeout setting

When you have multiple operating system on your computer, you should use an boot loader (OS-Selecctor) to switch between your different OS while booting up your system. There are several different boot loaders available now a days, but the most common one in Linux world perhaps is GRUB.

While using a boot loader (in this case, GRUB), you may want to change the default amount of timout before the boot loader choose the default selection. So i’m going to tutor how to change this setting.

This process has three steps:

  1. Opening GRUB configuration file.
  2. Change settings to your desired settings.
  3. Save configuration file and update the GRUB.

1. Opening GRUB configuration file.

At the first step you should open the GRUB configuration file. previously I had described how to open the configuration file in order to edit GRUB. Here I will post only the commands we need from that post (but I recommend you to also read that post).

Open the file in graphical mode using the following command:

sudo gedit /etc/default/grub

or open it in the terminal:

sudo nano -w /etc/default/grub


2. Change settings to your desired settings.

There are several lines in this file and each represents the setting for a specific part of GRUB.

  • GRUB_TIMEOUT which is the amount of time in seconds that the boot loader waits before choosing the default selection.
  • GRUB_DISTRIBUTOR which represents who had distribute this GRUB version
  • GRUB_DEFAULT This sets what should be the default selection among the list of operating systems during the boot time.
  • GRUB_CMDLINE_LINUX sets extra settings for the GRUB (for more advanced users)


So in this case we need to change the value of GRUB_TIMEOUT. Every positive number you choose, it will be the amount of seconds GRUB waits before continue it’s default process.
Negative number (-1) means the timer should not work, so the GRUB will not automatically select any OS without your direct interaction.

So for waiting 7 seconds:


and for disabling the timer:



3. Save configuration file and update the GRUB.

In the end you should save the configuration you modified and then force GRUB to obey the new rules 😀

If you opened the configuration file with gedit, just press Ctrl + s
If you opened the configuration file with nano, press Ctrl + x and then y and then press Enter. (If nano exits and you went back to command prompt, everything went well)

At this point you saved the configuration file successfully and the only thing left is to tell GRUB to follow new rules:

For Ubuntu:

sudo update-grub

For Fedora, CentOS and RHEL:

sudo grub2-mkconfig


If you faced any question, just let me know by comment.

Leave a Reply

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

This is new type of CAPTCHA, make the puzzle please !WordPress CAPTCHA