How to Set Linux Kernel Boot Parameters, Temporarily and Permanently

Quick answer

Once: at the GRUB menu press e, add the parameter to the end of the line starting with linux, press Ctrl+X. Permanently on Ubuntu/Debian/Mint: add it to GRUB_CMDLINE_LINUX_DEFAULT and regenerate the config. Fedora: use grubby.

# Ubuntu / Debian / Mint
sudo nano /etc/default/grub
sudo update-grub
# Fedora
sudo grubby --update-kernel=ALL --args="nomodeset"
# check after reboot
cat /proc/cmdline

What kernel parameters are

The bootloader passes a command line to the kernel at startup. It tells the kernel where the root filesystem is (root=UUID=...), how much to log (quiet), and can change driver behaviour (nomodeset, i915.enable_psr=0) or what to start instead of the normal system (systemd.unit=rescue.target). Parameters with a dot, like nvidia-drm.modeset=1, are options for a specific module.

See what the running kernel got:

cat /proc/cmdline

Example output:

BOOT_IMAGE=/boot/vmlinuz-7.0.0-15-generic root=UUID=6d1c...-9a2f ro quiet splash vt.handoff=7

First find out which bootloader you use, since the permanent method depends on it:

[ -d /sys/firmware/efi ] && echo UEFI || echo BIOS
bootctl status 2>/dev/null | grep -i 'product'
ls /boot/grub/grub.cfg /boot/grub2/grub.cfg 2>/dev/null

Ubuntu, Debian, Mint and Fedora use GRUB by default. Arch can use either GRUB or systemd-boot. Some newer openSUSE installs use systemd-boot or GRUB with Boot Loader Spec entries.

Temporary: add a parameter for one boot

Always test a parameter this way first. If it makes things worse, a normal reboot undoes it.

GRUB

  1. Reboot and wait for the GRUB menu. If it's hidden, hold Shift right after the firmware logo on BIOS systems, or press Esc repeatedly on UEFI systems.
  2. Highlight the entry and press e.
  3. Move to the line starting with linux (it may wrap onto several screen lines). Go to its end with End or Ctrl+E and add a space and the parameter.
  4. Press Ctrl+X or F10 to boot.

Example edited line:

linux /boot/vmlinuz-7.0.0-15-generic root=UUID=6d1c...-9a2f ro quiet splash nomodeset

systemd-boot

At the menu, highlight the entry and press e, edit the command line, then press Enter. If the menu doesn't show, press Space repeatedly during boot, or set timeout 3 in /boot/loader/loader.conf. Note that on systems that boot a signed Unified Kernel Image with Secure Boot, editing at the menu may be disabled by design.

Permanent: Ubuntu, Debian, Linux Mint (GRUB)

sudo cp /etc/default/grub /etc/default/grub.bak
sudo nano /etc/default/grub

Add the parameter inside the quotes:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nvidia-drm.modeset=1"
GRUB_CMDLINE_LINUX=""

GRUB_CMDLINE_LINUX_DEFAULT applies to normal boot entries; GRUB_CMDLINE_LINUX applies to all entries including recovery mode. Put debugging and display workarounds in the first, and things every boot needs (like a resume device or an IOMMU setting) in the second. Then regenerate grub.cfg:

sudo update-grub

Example output:

Sourcing file `/etc/default/grub'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-7.0.0-15-generic
Found initrd image: /boot/initrd.img-7.0.0-15-generic
done

On Ubuntu you can also drop a file into /etc/default/grub.d/ (for example /etc/default/grub.d/90-local.cfg with GRUB_CMDLINE_LINUX_DEFAULT="$GRUB_CMDLINE_LINUX_DEFAULT nomodeset") so package updates never conflict with your edit.

Permanent: Fedora (grubby)

Fedora stores boot entries as Boot Loader Spec files and manages their options with grubby. Editing /etc/default/grub only affects kernels installed later, so use grubby:

# add to all installed kernels
sudo grubby --update-kernel=ALL --args="nvidia-drm.modeset=1"
# remove again
sudo grubby --update-kernel=ALL --remove-args="nvidia-drm.modeset=1"
# show what the default kernel will get
sudo grubby --info=DEFAULT

New kernels inherit the options. The same commands work on RHEL, CentOS Stream, AlmaLinux and Rocky Linux.

Permanent: Arch Linux

With GRUB

sudo nano /etc/default/grub
# edit GRUB_CMDLINE_LINUX_DEFAULT, then:
sudo grub-mkconfig -o /boot/grub/grub.cfg

With systemd-boot

Each entry in /boot/loader/entries/ (or /efi/loader/entries/) has an options line. Add the parameter there:

sudo nano /boot/loader/entries/arch.conf
title   Arch Linux
linux   /vmlinuz-linux
initrd  /initramfs-linux.img
options root=UUID=6d1c...-9a2f rw quiet nvidia-drm.modeset=1

No regeneration step is needed. If you boot Unified Kernel Images built by mkinitcpio, the command line comes from /etc/kernel/cmdline instead; edit it and run sudo mkinitcpio -P to rebuild the images.

Permanent: openSUSE

With classic GRUB, edit /etc/default/grub as above, then:

sudo grub2-mkconfig -o /boot/grub2/grub.cfg

Or use YaST → System → Boot Loader → Kernel Parameters, which handles whichever bootloader is installed. On installs using systemd-boot or GRUB with BLS entries, the command line is kept in /etc/kernel/cmdline; after editing it, regenerate the boot entries with the sdbootutil tool (see sdbootutil --help) or let YaST do it for you. Check the openSUSE documentation for your release.

Common kernel parameters

ParameterWhat it doesUse it when
nomodesetDon't let graphics drivers set display modes; basic framebuffer onlyBlack screen at boot, to get in and fix the driver. Temporary only. See NVIDIA black screen.
nvidia-drm.modeset=1Enable kernel mode setting in the NVIDIA driverWayland or login loop problems on older NVIDIA driver branches (recent branches default to it)
module_blacklist=nouveauPrevent a module from loading at allTesting whether a driver causes a problem
quiet, splashLess boot output; show the graphical splashRemove both to see boot messages when diagnosing a hang or slow boot
systemd.unit=rescue.targetBoot to single-user rescue mode (asks for root password)Fixing a broken system with minimal services
systemd.unit=emergency.targetMost minimal shell, root mounted read-onlyWhen rescue mode itself fails; see emergency mode
systemd.unit=multi-user.targetBoot to a text login without the desktopGraphics problems; you get a normal console login
init=/bin/bashStart a root shell instead of systemdLast-resort password reset. Remount with mount -o remount,rw /; run sync before rebooting.
rd.breakStop in the Dracut initramfs before switching to the real rootDracut-based systems (Fedora, openSUSE, Ubuntu 26.04): root password reset, fixing fstab
fsck.mode=forceForce a filesystem check at bootSuspected filesystem corruption
acpi_backlight=video / native / vendorChoose which backlight interface to useBrightness keys or slider don't work on laptops
mem_sleep_default=deepUse S3 suspend instead of s2idleBattery drains during suspend, if the firmware supports S3
i915.enable_psr=0Disable panel self refresh on Intel graphicsScreen flicker or freezes on Intel laptops
amdgpu.dcdebugmask=0x10Disable PSR on AMD display hardwareFlicker or freezes on some AMD laptops
pcie_aspm=offDisable PCIe link power managementWi-Fi, NVMe or GPU errors linked to power states (costs battery)
intel_iommu=on, iommu=ptEnable the IOMMU; pass-through mode for host devicesGPU/PCI passthrough to VMs
usbcore.autosuspend=-1Disable USB autosuspend globallyUSB devices that disconnect after idle
i8042.reset i8042.nomuxChange how the PS/2 controller is probedDead keyboard or touchpad on some laptops
resume=UUID=...Swap device to resume from hibernationSetting up hibernation; remove stale ones if boot waits for a missing swap
loglevel=7, ignore_loglevelPrint all kernel messages to the consoleDebugging a hang during early boot
Parameters to avoid as permanent settings
  • mitigations=off disables CPU vulnerability protections (Spectre, Meltdown and successors). It can gain some performance but exposes you to real attacks. Don't use it on any machine that runs untrusted code, including a web browser.
  • acpi=off disables power management, multiple CPU cores and often USB on modern hardware. Use it only to test, never as a fix.
  • nomodeset left on permanently means no hardware acceleration, broken suspend and no Wayland on most GPUs.
  • Disabling security modules (selinux=0, apparmor=0) should only be a short diagnostic step. Fix the policy instead.

The complete, authoritative list is the kernel's kernel-parameters documentation.

Module options: kernel command line vs modprobe.d

A module option can be set two ways:

# on the kernel command line (works for built-in modules and early boot)
snd_hda_intel.power_save=0
# in a file (applies when the module is loaded)
echo 'options snd_hda_intel power_save=0' | sudo tee /etc/modprobe.d/audio-powersave.conf

The file method is easier to manage and survives bootloader changes. Use the command line for modules built into the kernel or loaded from the initramfs before /etc is available; if a module is in the initramfs, rebuild it after changing modprobe.d (sudo update-initramfs -u on Ubuntu 24.04 and Debian, sudo dracut --force on Fedora, openSUSE and Ubuntu 26.04, sudo mkinitcpio -P on Arch). Check a module's current values with:

modinfo -p snd_hda_intel
cat /sys/module/snd_hda_intel/parameters/power_save

Runtime tunables under /proc/sys are a third, different mechanism: set them with sysctl and persist them in /etc/sysctl.d/.

If a parameter stops the system from booting

Boot once without it: press e at the GRUB or systemd-boot menu and delete the parameter from the line, then boot. Once in, remove it from /etc/default/grub and run update-grub (or grubby --remove-args on Fedora, or edit the systemd-boot entry). If you can't reach the menu at all, boot a live USB, mount your root partition and edit the file there; the chroot steps are in fix grub rescue.

Frequently asked questions

How do I check which kernel parameters are active?

Run cat /proc/cmdline. It shows the exact command line the running kernel was booted with.

What is the difference between GRUB_CMDLINE_LINUX and GRUB_CMDLINE_LINUX_DEFAULT?

GRUB_CMDLINE_LINUX applies to every entry, including recovery mode. GRUB_CMDLINE_LINUX_DEFAULT applies only to normal entries, which is why quiet splash lives there.

I edited /etc/default/grub but nothing changed. Why?

GRUB reads the generated grub.cfg, not /etc/default/grub. Run sudo update-grub on Ubuntu and Debian or grub-mkconfig -o on Arch and openSUSE. On Fedora, use grubby.

Can I set module options as kernel parameters?

Yes. Use module.option=value, for example nvidia-drm.modeset=1. For modules loaded after boot you can instead put options module option=value in a file under /etc/modprobe.d/.

Are kernel parameters the same as sysctl settings?

No. Kernel parameters are passed once at boot by the bootloader. sysctl settings under /proc/sys can be changed at runtime and are made permanent in /etc/sysctl.d/.

Spotted a mistake or a command that no longer works? Send a correction — pages are re-checked when reports come in.