如何显示为当前引导提供的Linux内核命令行参数?


71

grub.conf配置文件中,我可以指定内核将使用的命令行参数,即:

kernel /boot/kernel-3-2-1-gentoo root=/dev/sda1 vga=791

引导给定的内核后,是否有办法显示首先传递给内核的命令行参数?我已经找到sysctl,

sysctl --all

但是sysctl显示所有可能的内核参数。

Answers:


109
$ cat /proc/cmdline
root=/dev/xvda xencons=tty console=tty1 console=hvc0 nosep nodevfs ramdisk_size=32768 ip_conntrack.hashsize=8192 nf_conntrack.hashsize=8192 ro  devtmpfs.mount=1 
$

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.