Updated: 28 September 2026 · Applies to: grubby 8.40 on AlmaLinux and Rocky Linux 9 and 10 and RHEL 9 and 10; GRUB on Ubuntu 24.04 and 26.04 and Debian 13
The kernel command line holds boot options such as crashkernel=, console=, transparent_hugepage= or ipv6.disable=1. This guide changes it permanently, for the current kernel and for kernels installed later. For a one-time change from the boot menu, see how to change GRUB kernel parameters before booting. On CentOS 7 and older releases the method was to edit /etc/default/grub and rebuild grub.cfg; on AlmaLinux, Rocky Linux and RHEL 9 and 10 the tool is grubby.
See the current command line
cat /proc/cmdline # what the running kernel was started with grubby --info=DEFAULT # what the default boot entry will use next time
AlmaLinux, Rocky Linux and RHEL 9 and 10
- Add a parameter to every boot entry:
grubby --update-kernel=ALL --args="consoleblank=0"
- Remove one:
grubby --update-kernel=ALL --remove-args="rhgb quiet"
- Change only the default kernel instead of all of them: use
--update-kernel=DEFAULT. - Check the result, then reboot:
grubby --info=ALL | grep -E '^(title|args)' reboot
Kernels installed later take over the parameters of the current default kernel. If you also regenerate grub.cfg with grub2-mkconfig for other reasons, keep GRUB_CMDLINE_LINUX in /etc/default/grub in line with your changes.
Ubuntu and Debian
- Edit
/etc/default/grub. Put parameters for normal boots inGRUB_CMDLINE_LINUX_DEFAULT, and parameters for every boot, including recovery mode, inGRUB_CMDLINE_LINUX:GRUB_CMDLINE_LINUX_DEFAULT="quiet consoleblank=0"
- Rebuild the boot menu and reboot:
update-grub reboot
Check after the reboot
cat /proc/cmdline
Common problems
- A parameter was added twice: grubby replaces an existing
name=valuerather than adding a second one; check withgrubby --info=ALL. - The server does not boot with the new option: choose an older entry in the GRUB menu, or remove the option for one boot as described in the linked guide above, then undo it with
--remove-args. - Cloud or VPS images with their own settings files: some add files in
/etc/default/grub.d/that override/etc/default/grubon Ubuntu. Check that folder too.
Official documentation: Configuring kernel command-line parameters (Red Hat) and GNU GRUB manual.