blob: d6e3f67953a73f9b9c2199fcc8ad077368de9b3c [file] [log] [blame]
Andrew Clayton9b9355a2017-04-20 14:04:15 +01001.. _kernelparameters:
2
Jonathan Corbet7358bb22016-10-26 16:14:52 -06003The kernel's command-line parameters
4====================================
Linus Torvalds1da177e2005-04-16 15:20:36 -07005
Randy Dunlap81e79062020-12-26 09:44:33 -08006The following is a consolidated list of the kernel parameters as implemented
7by the __setup(), early_param(), core_param() and module_param() macros
Rusty Russell5888bcc2014-05-14 10:33:45 +09308and sorted into English Dictionary order (defined as ignoring all
9punctuation and sorting digits before letters in a case insensitive
10manner), and with descriptions where known.
Linus Torvalds1da177e2005-04-16 15:20:36 -070011
Stephen Kitt62ee81b2019-06-27 15:59:38 +020012The kernel parses parameters from the kernel command line up to "``--``";
Rusty Russell5888bcc2014-05-14 10:33:45 +093013if it doesn't recognize a parameter and it doesn't contain a '.', the
14parameter gets passed to init: parameters with '=' go into init's
15environment, others are passed as command line arguments to init.
Stephen Kitt62ee81b2019-06-27 15:59:38 +020016Everything after "``--``" is passed as an argument to init.
Linus Torvalds1da177e2005-04-16 15:20:36 -070017
Rusty Russell5888bcc2014-05-14 10:33:45 +093018Module parameters can be specified in two ways: via the kernel command
Mauro Carvalho Chehab684adc02016-09-21 09:48:55 -030019line with a module name prefix, or via modprobe, e.g.::
Linus Torvalds1da177e2005-04-16 15:20:36 -070020
Rusty Russell5888bcc2014-05-14 10:33:45 +093021 (kernel command line) usbcore.blinkenlights=1
22 (modprobe command line) modprobe usbcore blinkenlights=1
Linus Torvalds1da177e2005-04-16 15:20:36 -070023
Rusty Russell5888bcc2014-05-14 10:33:45 +093024Parameters for modules which are built into the kernel need to be
25specified on the kernel command line. modprobe looks through the
26kernel command line (/proc/cmdline) and collects module parameters
27when it loads a module, so the kernel command line can be used for
28loadable modules too.
Linus Torvalds1da177e2005-04-16 15:20:36 -070029
Mauro Carvalho Chehab684adc02016-09-21 09:48:55 -030030Hyphens (dashes) and underscores are equivalent in parameter names, so::
31
Randy Dunlapca1eda22009-05-06 16:02:58 -070032 log_buf_len=1M print-fatal-signals=1
Mauro Carvalho Chehab684adc02016-09-21 09:48:55 -030033
34can also be entered as::
35
Randy Dunlapca1eda22009-05-06 16:02:58 -070036 log-buf-len=1M print_fatal_signals=1
37
Mauro Carvalho Chehab684adc02016-09-21 09:48:55 -030038Double-quotes can be used to protect spaces in values, e.g.::
39
Rusty Russell5888bcc2014-05-14 10:33:45 +093040 param="spaces in here"
Randy Dunlapca1eda22009-05-06 16:02:58 -070041
Noam Camus2d13e6c2016-10-11 13:51:35 -070042cpu lists:
43----------
44
45Some kernel parameters take a list of CPUs as a value, e.g. isolcpus,
46nohz_full, irqaffinity, rcu_nocbs. The format of this list is:
47
48 <cpu number>,...,<cpu number>
49
50or
51
52 <cpu number>-<cpu number>
53 (must be a positive range in ascending order)
54
55or a mixture
56
57<cpu number>,...,<cpu number>-<cpu number>
58
59Note that for the special case of a range one can split the range into equal
60sized groups and for each group use some amount from the beginning of that
61group:
62
Wolfram Sang187623b2021-01-27 11:43:43 +010063 <cpu number>-<cpu number>:<used size>/<group size>
Noam Camus2d13e6c2016-10-11 13:51:35 -070064
65For example one can add to the command line following parameter:
66
67 isolcpus=1,2,10-20,100-2000:2/25
68
69where the final item represents CPUs 100,101,125,126,150,151,...
70
Paul Gortmaker2c4885d2021-02-21 03:08:25 -050071The value "N" can be used to represent the numerically last CPU on the system,
72i.e "foo_cpus=16-N" would be equivalent to "16-31" on a 32 core system.
73
74Keep in mind that "N" is dynamic, so if system changes cause the bitmap width
75to change, such as less cores in the CPU list, then N and any ranges using N
76will also change. Use the same on a small 4 core system, and "16-N" becomes
77"16-3" and now the same boot input will be flagged as invalid (start > end).
Noam Camus2d13e6c2016-10-11 13:51:35 -070078
79
Stefan Richtera901ebb2006-04-01 01:43:18 +020080This document may not be entirely up to date and comprehensive. The command
81"modinfo -p ${modulename}" shows a current list of all parameters of a loadable
82module. Loadable modules, after being loaded into the running kernel, also
83reveal their parameters in /sys/module/${modulename}/parameters/. Some of these
84parameters may be changed at runtime by the command
Mauro Carvalho Chehab684adc02016-09-21 09:48:55 -030085``echo -n ${value} > /sys/module/${modulename}/parameters/${parm}``.
Stefan Richtera901ebb2006-04-01 01:43:18 +020086
Stefan Richter6585fa82006-04-01 01:44:30 +020087The parameters listed below are only valid if certain kernel build options were
88enabled and if respective hardware is present. The text in square brackets at
89the beginning of each description states the restrictions within which a
Mauro Carvalho Chehab684adc02016-09-21 09:48:55 -030090parameter is applicable::
Linus Torvalds1da177e2005-04-16 15:20:36 -070091
92 ACPI ACPI support is enabled.
Chuck Ebbertc99c1082007-07-27 10:46:20 +100093 AGP AGP (Accelerated Graphics Port) is enabled.
Linus Torvalds1da177e2005-04-16 15:20:36 -070094 ALSA ALSA sound support is enabled.
95 APIC APIC support is enabled.
96 APM Advanced Power Management support is enabled.
Randy Dunlap16290242011-08-13 12:34:52 -070097 ARM ARM architecture is enabled.
Josh Poimboeuf4ad499c2019-04-12 22:56:21 -050098 ARM64 ARM64 architecture is enabled.
Linus Torvalds1da177e2005-04-16 15:20:36 -070099 AX25 Appropriate AX.25 support is enabled.
Olof Johansson1e435252013-04-27 14:10:18 -0700100 CLK Common clock infrastructure is enabled.
Robert Tivy5c71d612013-03-28 18:41:46 -0700101 CMA Contiguous Memory Area support is enabled.
Alan Cox9cfe2682011-01-25 14:18:38 +0000102 DRM Direct Rendering Management support is enabled.
103 DYNAMIC_DEBUG Build in debug messages and enable them at runtime
Linus Torvalds1da177e2005-04-16 15:20:36 -0700104 EDD BIOS Enhanced Disk Drive Services (EDD) is enabled
105 EFI EFI Partitioning (GPT) is enabled
106 EIDE EIDE/ATAPI support is enabled.
Mimi Zohar7102ebc2011-05-12 18:33:20 -0400107 EVM Extended Verification Module
Linus Torvalds1da177e2005-04-16 15:20:36 -0700108 FB The frame buffer device is enabled.
Randy Dunlap16290242011-08-13 12:34:52 -0700109 FTRACE Function tracing enabled.
Peter Oberparleiter2521f2c2009-06-17 16:28:08 -0700110 GCOV GCOV profiling is enabled.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700111 HW Appropriate hardware is enabled.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700112 IA-64 IA-64 architecture is enabled.
Mimi Zohar6146f0d2009-02-04 09:06:57 -0500113 IMA Integrity measurement architecture is enabled.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700114 IOSCHED More than one I/O scheduler is enabled.
Adrian Bunk41e2e8b2005-07-12 13:58:33 -0700115 IP_PNP IP DHCP, BOOTP, or RARP is enabled.
Brian Haleyb0f83b22010-02-04 13:36:50 -0800116 IPV6 IPv6 support is enabled.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700117 ISAPNP ISA PnP code is enabled.
118 ISDN Appropriate ISDN support is enabled.
Frederic Weisbeckerd94d1052017-12-14 19:18:27 +0100119 ISOL CPU Isolation is enabled.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700120 JOY Appropriate joystick support is enabled.
Jason Wessel84c08fd2010-05-20 21:04:24 -0500121 KGDB Kernel debugger support is enabled.
Andre Przywarafef07aa2009-07-10 14:20:35 +0200122 KVM Kernel Virtual Machine support is enabled.
Kristen Carlson Accardi11ef6972006-09-28 11:29:01 -0700123 LIBATA Libata driver is enabled
Linus Torvalds1da177e2005-04-16 15:20:36 -0700124 LP Printer support is enabled.
125 LOOP Loopback device support is enabled.
126 M68k M68k architecture is enabled.
127 These options have more detailed description inside of
Mauro Carvalho Chehab23e02422019-04-14 08:27:15 -0300128 Documentation/m68k/kernel-options.rst.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700129 MDA MDA console support is enabled.
Randy Dunlap16290242011-08-13 12:34:52 -0700130 MIPS MIPS architecture is enabled.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700131 MOUSE Appropriate mouse support is enabled.
Matthew Wilcox309e57d2006-03-05 22:33:34 -0700132 MSI Message Signaled Interrupts (PCI).
Randy Dunlapc8facbb2007-07-31 00:37:40 -0700133 MTD MTD (Memory Technology Device) support is enabled.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700134 NET Appropriate network support is enabled.
135 NUMA NUMA support is enabled.
136 NFS Appropriate NFS support is enabled.
Saravana Kannana3e1d1a2019-09-04 14:11:22 -0700137 OF Devicetree is enabled.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700138 OSS OSS sound support is enabled.
Randy Dunlapc8facbb2007-07-31 00:37:40 -0700139 PV_OPS A paravirtualized kernel is enabled.
140 PARIDE The ParIDE (parallel port IDE) subsystem is enabled.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700141 PARISC The PA-RISC architecture is enabled.
142 PCI PCI bus support is enabled.
Randy Dunlap7f785762007-10-05 13:17:58 -0700143 PCIE PCI Express support is enabled.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700144 PCMCIA The PCMCIA subsystem is enabled.
145 PNP Plug & Play support is enabled.
146 PPC PowerPC architecture is enabled.
147 PPT Parallel port support is enabled.
148 PS2 Appropriate PS/2 support is enabled.
149 RAM RAM disk support is enabled.
Tony Luck1d9807f2017-08-24 09:26:51 -0700150 RDT Intel Resource Director Technology.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700151 S390 S390 architecture is enabled.
152 SCSI Appropriate SCSI support is enabled.
Randy Dunlap163475f2010-08-14 12:36:14 -0700153 A lot of drivers have their options described inside
154 the Documentation/scsi/ sub-directory.
James Morris20510f22007-10-16 23:31:32 -0700155 SECURITY Different security models are enabled.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700156 SELINUX SELinux support is enabled.
John Johansenc1c124e2010-07-29 14:48:09 -0700157 APPARMOR AppArmor support is enabled.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700158 SERIAL Serial support is enabled.
Paul Mundte523d932007-02-28 18:30:01 +0900159 SH SuperH architecture is enabled.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700160 SMP The kernel is an SMP kernel.
161 SPARC Sparc architecture is enabled.
David Brownell77437fd2008-07-23 21:28:33 -0700162 SWSUSP Software suspend (hibernation) is enabled.
163 SUSPEND System suspend states are enabled.
Rajiv Andrade225a9be2010-03-25 00:55:32 -0300164 TPM TPM drivers are enabled.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700165 TS Appropriate touchscreen support is enabled.
Alan Sternd4f373e2008-11-10 14:07:45 -0500166 UMS USB Mass Storage support is enabled.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700167 USB USB support is enabled.
168 USBHID USB Human Interface Device support is enabled.
169 V4L Video For Linux support is enabled.
Pawel Moll81a054c2012-05-09 18:30:16 +0100170 VMMIO Driver for memory mapped virtio devices is enabled.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700171 VGA The VGA console has been enabled.
172 VT Virtual terminal support is enabled.
173 WDT Watchdog support is enabled.
174 XT IBM PC/XT MFM hard disk support is enabled.
Alan Coxcd4f0ef2007-07-31 00:37:59 -0700175 X86-32 X86-32, aka i386 architecture is enabled.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700176 X86-64 X86-64 architecture is enabled.
177 More X86-64 boot options can be found in
Mauro Carvalho Chehabcb1aaeb2019-06-07 15:54:32 -0300178 Documentation/x86/x86_64/boot-options.rst.
Randy Dunlap16290242011-08-13 12:34:52 -0700179 X86 Either 32-bit or 64-bit x86 (same as X86-32+X86-64)
Alex Thorlton1c532e02016-03-31 14:18:29 -0500180 X86_UV SGI UV support is enabled.
Stefano Stabellinic1c54132010-05-14 12:44:30 +0100181 XEN Xen support is enabled
Barry Song4c8e3de2020-11-29 08:51:21 +1300182 XTENSA xtensa architecture is enabled.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700183
Mauro Carvalho Chehab684adc02016-09-21 09:48:55 -0300184In addition, the following text indicates that the option::
Linus Torvalds1da177e2005-04-16 15:20:36 -0700185
186 BUGS= Relates to possible processor bugs on the said processor.
187 KNL Is a kernel start-up parameter.
188 BOOT Is a boot loader parameter.
189
190Parameters denoted with BOOT are actually interpreted by the boot
191loader, and have no meaning to the kernel directly.
192Do not modify the syntax of boot loader parameters without extreme
Mauro Carvalho Chehabcb1aaeb2019-06-07 15:54:32 -0300193need or coordination with <Documentation/x86/boot.rst>.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700194
Karsten Weiss55588702007-02-13 13:26:21 +0100195There are also arch-specific kernel-parameters not documented here.
Mauro Carvalho Chehabcb1aaeb2019-06-07 15:54:32 -0300196See for example <Documentation/x86/x86_64/boot-options.rst>.
Karsten Weiss55588702007-02-13 13:26:21 +0100197
Linus Torvalds1da177e2005-04-16 15:20:36 -0700198Note that ALL kernel parameters listed below are CASE SENSITIVE, and that
199a trailing = on the name of any parameter states that that parameter will
200be entered as an environment variable, whereas its absence indicates that
201it will appear as a kernel argument readable via /proc/cmdline by programs
202running once the system is up.
203
jens m. noedler9c4751f2006-09-29 02:00:27 -0700204The number of kernel parameters is not limited, but the length of the
205complete command line (parameters including spaces etc.) is limited to
206a fixed number of characters. This limit depends on the architecture
207and is between 256 and 4096 characters. It is defined in the file
208./include/asm/setup.h as COMMAND_LINE_SIZE.
209
Ahmed S. Darwish7a19a232011-02-20 20:08:35 -0800210Finally, the [KMG] suffix is commonly described after a number of kernel
211parameter values. These 'K', 'M', and 'G' letters represent the _binary_
Tamara Diaconita9f02a482017-03-14 10:38:35 +0200212multipliers 'Kilo', 'Mega', and 'Giga', equaling 2^10, 2^20, and 2^30
Jani Nikulae52347b2016-11-03 12:10:10 +0200213bytes respectively. Such letter suffixes can also be entirely omitted:
Ahmed S. Darwish7a19a232011-02-20 20:08:35 -0800214
Jani Nikulae52347b2016-11-03 12:10:10 +0200215.. include:: kernel-parameters.txt
216 :literal:
Linus Torvalds1da177e2005-04-16 15:20:36 -0700217
Mauro Carvalho Chehab684adc02016-09-21 09:48:55 -0300218Todo
219----
Linus Torvalds1da177e2005-04-16 15:20:36 -0700220
Linus Torvalds1da177e2005-04-16 15:20:36 -0700221 Add more DRM drivers.