Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/deelerdev/linux/llms.txt

Use this file to discover all available pages before exploring further.

The Linux kernel accepts a list of parameters on its command line, supplied by the bootloader before the kernel starts. These parameters tune low-level behaviour — from which device to use as the root filesystem to how many CPUs to bring online — without requiring a kernel recompile. This page covers the most important parameters, how to pass them at boot, and how to persist them permanently.

How parameters are passed

The bootloader (typically GRUB) constructs the kernel command line and hands it to the kernel during the boot handoff. Once the kernel is running you can inspect the exact line it received:
cat /proc/cmdline
Parameters are whitespace-separated key=value pairs or bare flags. Hyphens and underscores are interchangeable in parameter names, so log_buf_len and log-buf-len are identical. Double-quotes protect values that contain spaces:
param="value with spaces"
Module parameters can be set on the command line using modulename.param=value syntax, and they are also exposed at runtime under /sys/module/<modulename>/parameters/. You can inspect what parameters a loadable module accepts with:
modinfo -p <modulename>

Essential parameters

console=

Directs kernel console output to a specific device. You can specify multiple console= options; the last one becomes the primary console but all receive output.
# Serial port at 115200 baud
console=ttyS0,115200n8

# Virtual terminal 1 (the default on most desktop systems)
console=tty1

# Hypervisor virtual console (Xen, PowerPC)
console=hvc0

# Discard all console output
console=null
For early boot output before the full serial driver is ready, add an earlycon parameter alongside console=.

root=

Specifies the root filesystem device. The kernel mounts this device as / after the initial RAM disk (initrd/initramfs) stage completes.
# Specify by device path
root=/dev/sda1

# Specify by filesystem UUID (preferred — survives device renaming)
root=UUID=8a4d2c1e-1234-5678-abcd-ef0123456789

# Specify by partition label
root=LABEL=rootfs

# Use the legacy initial ramdisk as root
root=ram

# Network root (NFS)
root=nfs

ro and rw

Control whether the root filesystem is mounted read-only or read-write during early boot.
# Mount root read-only (standard — fsck can run safely before remounting rw)
ro

# Mount root read-write immediately
rw
Most distributions boot with ro and then remount read-write via an init script once filesystem checks pass.

quiet

Suppresses most kernel log messages from appearing on the console during boot. The messages are still recorded in the kernel ring buffer and accessible via dmesg.
quiet
Remove quiet temporarily to see all boot-time messages, which is useful when diagnosing failures.

loglevel=

Sets the console log level. Messages with a severity numerically lower than this value are printed to the console. The levels are:
ValueNameMeaning
0KERN_EMERGSystem is unusable
1KERN_ALERTAction must be taken immediately
2KERN_CRITCritical conditions
3KERN_ERRError conditions
4KERN_WARNINGWarning conditions
5KERN_NOTICENormal but significant
6KERN_INFOInformational
7KERN_DEBUGDebug-level messages
# Print warnings and above (suppress info/debug)
loglevel=4

# Print everything including debug messages
loglevel=7

panic=

Controls what the kernel does after a panic.
# Reboot automatically after 5 seconds
panic=5

# Reboot immediately
panic=-1

# Wait forever (default, allows capturing the oops message)
panic=0

mem=

Limits the amount of memory the kernel will use. Useful for testing, kdump kernels, or working around firmware bugs.
# Limit to 2 GB
mem=2G

# Limit to 512 MB
mem=512M
Memory beyond the mem= boundary is excluded from the kernel. On x86 systems, combine with memmap= to avoid conflicts with PCI device address ranges mapped into the excluded region.

maxcpus=

Limits the number of CPUs brought online during boot on SMP kernels. After boot you can bring additional CPUs online manually.
# Boot with only one CPU
maxcpus=1

# Equivalent to nosmp (also disables the IO APIC)
maxcpus=0
After boot, bring a CPU back online:
echo 1 > /sys/devices/system/cpu/cpu3/online

nomodeset

Prevents DRM and framebuffer drivers from loading if they would displace the firmware-initialised display. The system falls back to the firmware’s framebuffer only.
nomodeset
Use this when a GPU driver causes a blank screen during boot, or for debugging display issues.

CPU list format

Several parameters accept a list of CPU numbers. The supported formats are:
# Comma-separated individual CPUs
isolcpus=1,2,3

# A contiguous range
isolcpus=4-7

# Mixed
isolcpus=1,2,10-20

# Strided: select 2 CPUs from each group of 25, starting at CPU 100
isolcpus=100-2000:2/25

# All CPUs
nohz_full=all

Setting parameters permanently in GRUB

1

Edit the GRUB defaults file

Open /etc/default/grub in a text editor and append your parameters to the GRUB_CMDLINE_LINUX_DEFAULT line.
# /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash console=ttyS0,115200n8 panic=5"
2

Regenerate the GRUB configuration

sudo update-grub
3

Verify the change

Reboot and confirm the parameters took effect:
cat /proc/cmdline
To test a parameter without making it permanent, highlight the kernel entry in the GRUB menu at boot, press e to edit, append the parameter to the linux line, then press Ctrl+X or F10 to boot.

Runtime parameters with sysctl

Many kernel knobs can be changed at runtime through the sysctl interface without rebooting. These are distinct from boot parameters — they take effect immediately on a running kernel.
# View all runtime parameters
sysctl -a

# Read a single value
sysctl kernel.hostname

# Set a value for the current session
sysctl -w kernel.panic=5

# Set a value permanently (persists across reboots)
echo "kernel.panic = 5" | sudo tee /etc/sysctl.d/99-local.conf
sudo sysctl -p /etc/sysctl.d/99-local.conf
The full list of sysctl knobs is documented under Documentation/admin-guide/sysctl/ in the kernel source tree.

Build docs developers (and LLMs) love