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/grubEnter 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:
- Specific delay: Set
GRUB_TIMEOUT=5to wait 5 seconds before booting. - Boot immediately: Set
GRUB_TIMEOUT=0to skip the boot menu entirely. - Wait indefinitely: Set
GRUB_TIMEOUT=-1to display the menu until you manually press Enter.
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:
- Press
Ctrl + Oand hitEnterto save your changes. - Press
Ctrl + Xto 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-grubOnce the process finishes, reboot your system to verify that the new boot menu timeout duration is active.