Inspect the root=, quiet, and other arguments passed by the bootloader to the running kernel.
Read the values actually used for the current boot from procfs.
Which command is correct?
/proc/cmdline exposes the command-line arguments received by the currently running kernel.
Detailed explanation
cat /proc/cmdlineCorrect. cat /proc/cmdline prints the current kernel command line.
Correct. cat /proc/cmdline prints the current kernel command line.
cat /proc/versionIncorrect. /proc/version describes kernel build information.
Incorrect. /proc/version describes kernel build information.
cat /etc/fstabIncorrect. /etc/fstab describes filesystem mounts and is not the kernel command line.
Incorrect. /etc/fstab describes filesystem mounts and is not the kernel command line.
cat /etc/shellsIncorrect. /etc/shells lists valid login shells.
Incorrect. /etc/shells lists valid login shells.
Try it yourself
An example you can run in a temporary verification environment.
cat /proc/cmdlineExpected result
カーネル引数の1行(仮想化環境では内容が少ない場合がある)Key points
- It shows the arguments for the current boot
- It is readable through procfs
- It differs from configuration files
Notes
- Environment: Linux / procfs
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.