Improve Linux Boot Speed by Shortening the GRUB Menu Timeout

A shorter GRUB timeout can improve Linux boot speed only when the computer is waiting at the GRUB menu. If your menu currently waits five seconds, setting it to two seconds removes up to three seconds from that pause. It does not speed up firmware checks, kernel loading, disk-unlock prompts, or startup services. This guide sets a two-second timeout and keeps the menu visible so you can still select another kernel or recovery entry. The GNU GRUB manual documents how the timeout and menu style work.

1. Back up the GRUB defaults file

These steps are for a system that boots with GRUB 2 and has an /etc/default/grub file. Open a terminal and copy that source file before editing it:

Terminal command copying /etc/default/grub to /etc/default/grub.bak before any edits
Back up the GRUB defaults file so you can restore the previous settings.
sudo cp /etc/default/grub /etc/default/grub.bak

If /etc/default/grub.bak already exists, choose a different backup filename and use that same name in the restore step below. The file you edit is the input to GRUB’s configuration generator; do not edit the generated grub.cfg directly.

2. Set a short, visible timeout

Open the defaults file with a text editor running as an administrator:

sudo nano /etc/default/grub
Text editor showing GRUB_TIMEOUT_STYLE=menu and GRUB_TIMEOUT=2 in /etc/default/grub
Use a visible menu with a two-second countdown.

Find the existing GRUB_TIMEOUT line and change its value. Set the menu style as shown; if either setting is already present, edit that line instead of creating a duplicate:

GRUB_TIMEOUT_STYLE=menu
GRUB_TIMEOUT=2

Save the file and exit the editor. With menu style, GRUB displays the menu and waits two seconds before starting the default entry. A zero timeout boots immediately without showing the menu, which can make it harder to choose a recovery option, an older kernel, or another operating system. A positive value such as two seconds is a safer everyday compromise.

3. Regenerate the GRUB menu for your distribution

Editing /etc/default/grub alone does not update the generated boot menu. Run only the command that matches your distribution and bootloader setup:

SystemCommand or guidance
Debian or Ubuntusudo update-grub
Arch Linuxsudo grub-mkconfig -o /boot/grub/grub.cfg
Fedora or a standard RHEL 9.3+ layoutsudo grub2-mkconfig -o /boot/grub2/grub.cfg
openSUSE Leap with classic GRUB 2sudo grub2-mkconfig -o /boot/grub2/grub.cfg

Debian’s update-grub manual describes that helper as generating /boot/grub/grub.cfg. The Arch GRUB guide documents the Arch output path, and the Fedora GRUB guide covers its GRUB tools. Red Hat notes that RHEL 9.3 and later use /boot/grub2/grub.cfg as the real configuration file; older releases and custom installations can use different paths, so check the guide for your exact release before generating a file.

Debian and Ubuntu terminal running sudo update-grub to regenerate the GRUB configuration
On Debian and Ubuntu, update-grub regenerates the menu configuration.

For openSUSE, the command above applies to classic GRUB 2 installations such as Leap. Since November 2025, YaST installations of openSUSE Tumbleweed default to GRUB2-BLS, which creates boot entries dynamically and does not use grub2-mkconfig. Follow the project’s GRUB2-BLS guidance for that setup. If your machine uses another bootloader, a custom UEFI layout, or a vendor-managed configuration, do not guess the output path.

4. Reboot and check the result

After the generator finishes without errors, reboot. Confirm that the GRUB menu appears, remains available briefly, and then starts the expected default operating system. If the menu still waits longer, another configuration file may override your setting, or the system may be booting through a different loader.

GRUB boot menu with Linux highlighted and a two-second countdown before automatic boot
A short positive timeout leaves a brief window to choose a menu entry.

If the delay happens after Linux begins loading, this GRUB change will not address it. Run systemd-analyze time to inspect the time reported for the kernel, initrd, and userspace stages; the systemd-analyze manual explains those measurements. Slow firmware checks or services need separate troubleshooting.

Undo the timeout change

To restore the saved defaults file, copy it back over the edited source file. This avoids deleting the active configuration before restoring it:

sudo cp /etc/default/grub.bak /etc/default/grub

Then regenerate the menu with the same distribution-specific command you used above and reboot. If the generator reports an error, restore the backup and correct the reported problem before restarting the computer.

Leave a Comment

How to Record Speaker Output on Linux with Audacity

How to Record Speaker Output on Linux with Audacity

Capture Linux desktop audio in Audacity by routing its recording stream to your output device’s monitor source. Follow PulseAudio and PipeWire steps, export tips, and fixes for silent tracks.

How to Use Dropbox on Linux: Install and Sync Your Files

How to Use Dropbox on Linux: Install and Sync Your Files

Install Dropbox on Linux from the official package, sign in, sync a local folder, manage selective sync, and check status from the command line.

How to Install Inkscape on Linux: Ubuntu, Fedora, Arch, and More

How to Install Inkscape on Linux: Ubuntu, Fedora, Arch, and More

Install Inkscape from your Linux distribution’s repositories, the Ubuntu stable PPA, Snap, or Flathub, with current commands and notes for choosing a package source.

How to Find and Remove Duplicate Files on Linux With FSlint

How to Find and Remove Duplicate Files on Linux With FSlint

Use FSlint to scan selected Linux folders, review duplicate groups, and safely delete redundant files or learn when hard-link merging is appropriate.

How to Install SABnzbd on Linux and Configure It

How to Install SABnzbd on Linux and Configure It

Install SABnzbd on Ubuntu or Debian, or run it in Docker on another Linux host. Then open the web interface and configure your provider and download folders.

How to Install the Paper GTK Theme on Linux

How to Install the Paper GTK Theme on Linux

Install the Paper GTK theme from supported Linux repositories, enable it for GTK apps in GNOME Tweaks, and see what the legacy theme can and cannot change.

How to Install and Set Up Plex on OpenMediaVault with Compose

How to Install and Set Up Plex on OpenMediaVault with Compose

The old OpenMediaVault Plex plugin is archived. Set up Plex on OMV 8 with OMV-Extras, the Compose plugin, persistent storage, and Plex’s official container.

How to Clean and Speed Up Ubuntu Safely

How to Clean and Speed Up Ubuntu Safely

Clean and speed up Ubuntu with safe APT cleanup, storage checks, and startup controls that help free space and troubleshoot a sluggish desktop.

How to Install the Hiri Email Client on Linux

How to Install the Hiri Email Client on Linux

Install Hiri on Linux with its Snap package or official tarball, add a desktop launcher, and check supported accounts plus a warning about Hiri’s old Snap release.

How to Get System Specifications for a Linux PC

How to Get System Specifications for a Linux PC

Use Fastfetch and built-in Linux commands to check your distro, kernel, CPU, memory, graphics, storage, and connected devices, then save a clear report.