Regenerate the GRUB Boot Menu with update-grub

After editing /etc/default/grub or installing a kernel, rebuild grub.cfg so the boot menu reflects it.

LinuxbootrepairgrubsystemdMedium risk
Run sudo update-grub — it regenerates /boot/grub/grub.cfg, detecting installed kernels and other operating systems automatically.

01Command

Command
$ sudo update-grub

02What it does

On Debian/Ubuntu, update-grub is a thin wrapper around grub-mkconfig -o /boot/grub/grub.cfg that scans /boot for kernels and probes other installed OSes via os-prober to build the menu. Edits to /etc/default/grub (timeout, default entry, kernel parameters via GRUB_CMDLINE_LINUX_DEFAULT) only take effect after this step. On Fedora and openSUSE there is no update-grub; use grub2-mkconfig -o /boot/grub2/grub.cfg instead.

03Risk

RiskMedium risk
Requirementsgrub2-common (Debian/Ubuntu family); on Fedora/openSUSE use grub2-mkconfig -o /boot/grub2/grub.cfg
!Warning: A broken grub.cfg can leave the machine unbootable — keep a live USB handy, and on EFI systems also check that the GRUB package install is intact before rebooting.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

Last verified: 2026-09-19 · Category: System & Settings

06Related solutions