Learn how to set and regenerate GRUB timeout so machines boot predictably and quickly. 16.11.2025 | reading time: 3 min Want the boot menu to appear longer, shorter or not at all? Adjusting GRUB's timeout is a two-step job: change the configuration and regenerate the boot config so the bootloader uses the new value. Change and apply the timeout Do this now: edit /etc/default/grub to set the timeout, then rebuild GRUB's config; for example run the following commands to set a three-second menu timeout and apply it: ```sudo sed -i 's/^GRUB_TIMEOUT=.*/GRUB_TIMEOUT=3/' /etc/default/grub sudo sed -i 's/^GRUB_TIMEOUT_STYLE=.*/GRUB_TIMEOUT_STYLE=menu/' /etc/default/grub sudo update-grub # Debian/Ubuntu # or on RHEL/Fedora: sudo grub2-mkconfig -o /boot/grub2/grub.cfg ``` After `update-grub` you will typically see "Generating grub configuration file ..." and the found kernel lines, which confirms the new timeout is active on next boot. When the menu hides or never shows If you prefer no menu, set `GRUB_TIMEOUT=0` and `GRUB_TIMEOUT_STYLE=hidden`, but keep a rescue plan: hold Shift (BIOS machines) or press Esc (UEFI machines) during boot to reveal the menu; short timeouts can frustrate hands-on work, so use small positive values for testing and then lower them once the configuration is stable. Other important parameters to know Besides `GRUB_TIMEOUT` and `GRUB_TIMEOUT_STYLE` check `GRUB_DEFAULT` to choose which entry boots, `GRUB_SAVEDEFAULT` to remember selections, and `GRUB_DISABLE_RECOVERY` to hide recovery entries; do not edit `/boot/grub/grub.cfg` directly — always change `/etc/default/grub` or scripts under `/etc/grub.d/` and then regenerate the config. OS-specific commands and helpers On Debian/Ubuntu use `update-grub` (wrapper around `grub-mkconfig`), on RHEL/Fedora use `grub2-mkconfig -o /boot/grub2/grub.cfg`, and for one-shot boots consider `grub-reboot` or `grub2-reboot`; for EFI layout differences check your distribution documentation before writing to the EFI directory. Safe rollback and automation tips Automate safe changes with a quick backup of the current config: `sudo cp /boot/grub/grub.cfg /boot/grub/grub.cfg.bak` and test timeouts with short values during maintenance windows; for scripted deployments modify `/etc/default/grub` with `sed` or configuration management and always run the appropriate `grub*-mkconfig` command as root afterwards. Final thought and next step A tiny change in GRUB can shave seconds from every boot or save time in emergencies; master these edits and consider formalizing skills with certifications like CompTIA Linux+ or LPIC-1, and intensive exam preparation at bitsandbytes.academy will sharpen practical abilities quickly. Join Bits & Bytes Academy First class LINUX exam preparation. boot-process setup utilities troubleshooting