How to Change GRUB Timeout in Ubuntu

Adjusting the GRUB boot menu timeout duration in Ubuntu allows you to control how long the boot menu appears before automatically loading the default operating system. This guide walks you through editing the primary GRUB configuration file via the terminal and applying your changes using a simple update command.

Step 1: Open the Terminal

Launch the terminal by pressing Ctrl + Alt + T on your keyboard or by searching for "Terminal" in your application menu.

Step 2: Open the GRUB Configuration File

To modify the timeout settings, open the GRUB configuration file in a command-line text editor with root privileges:

sudo nano /etc/default/grub

Enter your system password when prompted.

Step 3: Change the Timeout Value

Locate the line that contains GRUB_TIMEOUT. By default, it usually looks like this:

GRUB_TIMEOUT=10

Change the number to your preferred duration in seconds:

If the GRUB menu does not appear at all during boot, check the GRUB_TIMEOUT_STYLE line and ensure it is set to menu instead of hidden:

GRUB_TIMEOUT_STYLE=menu

Step 4: Save and Exit

If you are using the nano editor:

  1. Press Ctrl + O and hit Enter to save your changes.
  2. Press Ctrl + X to exit the editor.

Step 5: Apply the Changes

Changes made to /etc/default/grub will not take effect until you regenerate the main GRUB boot file. Run the following command:

sudo update-grub

Once the process finishes, reboot your system to verify that the new boot menu timeout duration is active.