grub-mkconfig
TLDR
Print configuration to stdout (dry run)
$ sudo grub-mkconfig
Generate configuration to file$ sudo grub-mkconfig -o /boot/grub/grub.cfg
Display help$ grub-mkconfig --help
Display version$ grub-mkconfig --version
SYNOPSIS
grub-mkconfig [OPTION]
DESCRIPTION
grub-mkconfig generates a GRUB bootloader configuration file by processing system settings and detecting installed operating systems. It is typically used after kernel updates or when modifying boot parameters.
PARAMETERS
-o, --output=FILE
Write the generated configuration to FILE instead of stdout-h, --help
Display help message and exit-V, --version
Display version information and exit
CAVEATS
This command should be run as root. The generated configuration depends on scripts in /etc/grub.d/ and settings in /etc/default/grub. After making changes to GRUB settings, always run grub-mkconfig to regenerate the configuration.
HISTORY
grub-mkconfig is part of GRUB 2 (GRand Unified Bootloader), which replaced the original GRUB Legacy. It provides automatic detection of installed kernels and operating systems.
SEE ALSO
grub-install(8), update-grub(8), grub-set-default(8)


