Change Grub Boot Loader’s Default OS Option and Timeout Duration in 5 Easy Steps

People who have installed Windows and Ubuntu onto their machines will be familiar with the Grub boot loader. This basically refers to the screen / application that lets you select an operating system when you startup your computer. Grub is a little biased however as its default OS option is invariably Ubuntu.

I wanted this default option to be Windows on my home laptop; I also wanted the timeout duration to be lesser than the default period one so that the overall startup process would speed up without requiring me to hit the Enter key on the boot loader screen. I found the Grub boot loader configuration file and I thought I should share this simple procedure with you all. I hope people who are running Windows and Ubuntu will find the following steps useful.

Step 1: Open the terminal window. To do this, simply type ‘terminal’ on the Run screen and press the Enter key.

Step 2: Make sure that you are not in a folder right now. If you are not sure what this means, simply execute the “cd” command.


Step 3: We are now going to open the Grub boot loader configuration file which is at “/etc/default/grub”. To open the file, you can use whichever text editor you prefer. I use VIM so my command was “vim /etc/default/grub”. Most users however would be more comfortable with gedit – Ubuntu’s version of Notepad; if this is the case with you, you should use “gedit /etc/default/grub”. Furthermore, your command should be preceded by “sudo” which would make your complete command “sudo gedit /etc/default/grub”. You will be prompted to enter the administrator password, after which the Grub boot loader configuration file will be opened in the text editor you chose (the screenshot below is of VIM).


Step 4: To change the timeout settings, you should modify the “GRUB_TIMEOUT” value. By default this value is 10 – this translates to 10 seconds. You can modify the value to change the timeout duration according to your preferences.

And to change the default operating system, you will need to recall which position your option currently comes from the top; you subtract 1 from this position and then assign this value to “GRUB_DEFAULT”. For example, if the Windows option is the fifth one from the top of the screen on the boot loader menu, you should assign GRUB_DEFAULT a value of 4.

Step 5: When your changes have been made, you can apply them by running the following command in the terminal: “sudo update-grub”

And there you have it – 5 easy steps to change the default OS option and timeout duration for Grub boot loader.



Share this post

Leave a Comment

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.