print_kernel_cmdline(9)
π print_kernel_cmdline β from the Kernel API Manual, section 9 π
okay so bestie, this is print_kernel_cmdline(9) β a function from the Kernel API Manual and honestly? she's a little cutie whose whole job is printing the kernel cmdline with wrapping. no cap. let's get into it πΈ
β¨ NAME β¨
print_kernel_cmdline β print the kernel cmdline, but with wrapping. that's it. that's the gig π
π¦ SYNOPSIS π¦
void print_kernel_cmdline (const char *cmdline );
π ARGUMENTS π
cmdlineβ the cmdline you want printed. hand it over, she'll do the rest π«Ά
π₯ DESCRIPTION π₯
So. She prints the kernel command line, and she tries to wrap it based on the Kconfig knob CONFIG_CMDLINE_LOG_WRAP_IDEAL_LEN. lowkey the whole vibe tbh β
Wrapping is based on spaces, and it ignores quotes β so a quote is not a get-out-of-jail card, bestie, a space is a space. every single line gets prefixed with "Kernel command line: ", and lines that are not the last line have a " line length for wrapping purposes. yes that sentence really does just stop mid-thought in the original π I'm not touching it, I'm keeping it exactly as written.
Also: the ideal length will be exceeded if no appropriate place to wrap is found. she tries her best, she's not about to break your words apart π
Example output if CONFIG_CMDLINE_LOG_WRAP_IDEAL_LEN is 40:
Kernel command line: loglevel=7
Kernel command line: init=/sbin/init
Kernel command line: root=PARTUUID=8c3efc1a-768b-6642-8d0c-89eb782f19f0/PARTNROFF=1
Kernel command line: rootwait ro
Kernel command line: my_quoted_arg="The
Kernel command line: quick brown fox
Kernel command line: jumps over the
Kernel command line: lazy dog."
like look at that PARTUUID line β she simply could not wrap it and she did not even pretend to π iconique.
π SEE ALSO π
- Kernel file
./init/main.cβ go read her, iykyk π
aaand that's the whole page, bestie β¨ cute little sign-off time: this one lives at ./init, the version/date on it is October 2026, and it's filed under print_kernel_cmdline(9). periodt ππ§
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms