BootPrompt HOWTO: Linux kernel command-line parameters

Updated November 2026

The kernel command line is a single line of text that the boot loader passes to the Linux kernel. It names the root file system and can switch drivers, logging, the graphics mode and the systemd target. You can see the current line in /proc/cmdline, change it for one boot from the GRUB or systemd-boot menu, and make changes permanent with update-grub, grubby or /etc/kernel/cmdline, depending on your distribution.

The 2001 BootPrompt HOWTO listed parameters for ISA sound cards and LILO's boot: prompt. LILO is gone (see the LILO mini-HOWTO), and the full, current list of parameters lives in the kernel's own documentation. This page covers how to set them and the ones that matter in practice.

How the kernel reads the line

$ cat /proc/cmdline
BOOT_IMAGE=/vmlinuz-6.12.…-amd64 root=UUID=3f1c…e9 ro quiet

Change it for one boot

This is the safe way to test a parameter. Nothing is saved, so a bad value disappears on the next reboot.

GRUB

  1. Show the menu. If it is hidden, hold Shift or press Esc (or F4) while the machine starts.
  2. Highlight the entry and press e.
  3. Find the line that starts with linux and add or change parameters at its end.
  4. Press Ctrl+x to boot. Esc discards the edit.

systemd-boot

Highlight the entry, press e, edit the line, and press Enter to boot it. Esc cancels. If the menu is not shown (timeout 0), hold down Space before the boot loader starts, or press it repeatedly during boot, or run systemctl reboot --boot-loader-menu=30 to show it for 30 seconds on the next boot. The editor uses a US keyboard layout unless the firmware is set otherwise.

Make it permanent

Where the permanent kernel command line lives (as of November 2026)
SystemEditThen run
Debian 13, Ubuntu 24.04/26.04 (GRUB)GRUB_CMDLINE_LINUX in /etc/default/grubsudo update-grub
Fedora, RHEL/Alma/Rocky 9–10 (GRUB + BLS)grubby --update-kernel=ALL --args=…nothing more
Arch Linux with GRUB/etc/default/grubsudo grub-mkconfig -o /boot/grub/grub.cfg
Any system with systemd-boot/etc/kernel/cmdline (and existing entry files)reinstall the kernel or edit options in the entry

Debian and Ubuntu

Two variables matter. GRUB_CMDLINE_LINUX is added to every Linux entry, including recovery mode. GRUB_CMDLINE_LINUX_DEFAULT is added only to the normal entries, after the values from GRUB_CMDLINE_LINUX. Debugging or display options usually belong in the second; anything the system needs to boot at all belongs in the first.

sudo nano /etc/default/grub
# GRUB_CMDLINE_LINUX_DEFAULT="quiet"
# GRUB_CMDLINE_LINUX="console=tty0 console=ttyS0,115200"
sudo update-grub

update-grub is a short wrapper for grub-mkconfig -o /boot/grub/grub.cfg. Never edit grub.cfg itself: the next kernel update regenerates it and your change is lost.

Fedora, RHEL, AlmaLinux and Rocky Linux

These distributions keep one small file per kernel in /boot/loader/entries/ (the Boot Loader Specification, BLS), each with its own options line. grubby edits them:

sudo grubby --update-kernel=ALL --args="console=ttyS0,115200"
sudo grubby --update-kernel=ALL --remove-args="quiet"
sudo grubby --update-kernel=/boot/vmlinuz-$(uname -r) --args="nosmt"   # one kernel only
sudo grubby --info=ALL | grep -E '^(kernel|args)'

New kernels copy the arguments of the current default kernel, so changes made with --update-kernel=ALL carry over. If you prefer /etc/default/grub, edit GRUB_CMDLINE_LINUX and run sudo grub2-mkconfig -o /boot/grub2/grub.cfg --update-bls-cmdline; without --update-bls-cmdline, existing entries keep their old options. The same path is correct on BIOS and UEFI systems.

systemd-boot

Each entry is a text file on the EFI system partition (or the XBOOTLDR partition), such as /boot/loader/entries/…conf, with an options line holding the command line. When a kernel is installed, kernel-install takes the command line from /etc/kernel/cmdline (falling back to /usr/lib/kernel/cmdline, then the running kernel's /proc/cmdline). So put your permanent line in /etc/kernel/cmdline for future kernels, and edit the options line of existing entries by hand. Run bootctl list to see the entries and their file paths.

Parameters you will actually use

Common kernel, systemd and initramfs parameters
ParameterWhat it doesUse it when
quietHides most kernel and systemd messagesRemove it to see where boot hangs
loglevel=7Prints all kernel messages up to debug level to the consoleDebugging driver problems
nomodesetStops graphics drivers from changing the display mode; only the firmware framebuffer is usedBlack screen after the boot loader; then install the right driver and remove it
console=ttyS0,115200Sends console output to the first serial port at 115200 baud (add console=tty0 to keep the screen too)Servers, VMs, headless boards
systemd.unit=rescue.target (or rescue, single, 1)Single-user rescue mode: file systems mounted, almost no servicesRepairs that need a mostly working system
systemd.unit=emergency.target (or emergency)Most minimal shell: no other services or mountsA broken /etc/fstab or unit stops normal boot
3 / 5Same as multi-user.target / graphical.targetBoot to a text console once without the desktop
systemd.debug_shellStarts a root shell on tty9 early in bootDebugging hangs (never leave it on)
rd.breakdracut stops at the end of the initramfs, before switching to the real rootFedora/RHEL recovery (see below)
init=/bin/bashRuns a shell instead of systemd as process 1Last-resort recovery on Debian/Ubuntu
ro / rwMount the root file system read-only / read-write at firstDistributions set this; leave it
rootwait, rootdelay=10Wait for the root device (USB, MMC) to appearBooting from slow or USB storage without an initramfs
module_blacklist=nouveauNever loads the named modules (comma-separated)A driver crashes or conflicts at boot
panic=10Reboots 10 seconds after a kernel panicUnattended servers
nosmtTurns off simultaneous multithreading (Hyper-Threading)Security policy or testing
mitigations=offTurns off CPU vulnerability mitigationsOnly isolated benchmark machines; it removes security protections

For the full list, see the kernel's kernel-parameters page. For screen resolution parameters (video=), see the Framebuffer HOWTO; for serial consoles, the Text-Terminal HOWTO.

Recovering a lost root password

On Fedora and RHEL-family systems, add rd.break to the linux line for one boot. You get a shell inside the initramfs, with the real root mounted read-only at /sysroot:

mount -o remount,rw /sysroot
chroot /sysroot
passwd root
touch /.autorelabel     # SELinux must relabel the changed password file
exit
exit

The relabel makes the next boot slower. If you skip it on an SELinux system, you may not be able to log in at all. On Debian and Ubuntu, add init=/bin/bash instead, then run mount -o remount,rw /, passwd, sync, and reboot -f. If the disk is encrypted, you still need its passphrase to get this far. Anyone with physical access can do this, which is why boot menus on shared machines should have a GRUB password and disks should be encrypted.

Check that it worked

cat /proc/cmdline                               # after rebooting
sudo grubby --info=DEFAULT                      # Fedora/RHEL: what the next boot will use
grep -A1 "^menuentry" /boot/grub/grub.cfg | head   # Debian/Ubuntu: generated entries
cat /sys/module/usbcore/parameters/autosuspend  # value a module actually uses

Mistakes to avoid

The classic BootPrompt HOWTO is kept by the LDP at tldp.org.

Sources