Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to find out with what parameters did the kernel boot?

For example if I specify noexec=off at the grub command line? Can I see this sort of info after the system has finished booting?

share|improve this question
up vote 32 down vote accepted

You can run cat /proc/cmdline.


[01:31] ~ $ cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-2.6.38-7-generic root=UUID=025c4231-b7bb-48bf-93e9-d20c5b5ce123 ro crashkernel=384M-2G:64M,2G-:128M quiet splash bootchart=disable acpi_enforce_resources=lax vga=792 vt.handoff=7
share|improve this answer

Actually, the parameter is located between __setup_start and __setup_end in the kernel. In the following code, the p->str is the parameter name

Following kernel code could be found at linux-3.4.5/init/main.c:388

/* Check for early params. */
static int __init do_early_param(char *param, char *val)
    const struct obs_kernel_param *p;
    for (p = __setup_start; p < __setup_end; p++) {
        if ((p->early && parameq(param, p->str)) ||
            (strcmp(param, "console") == 0 &&
             strcmp(p->str, "earlycon") == 0)
        ) {
            if (p->setup_func(val) != 0)
                       "Malformed early option '%s'\n", param);

    /* We accept everything at this stage. */
    return 0;
share|improve this answer

An alternative way is to check the output of dmesg (line 5 here):

$ dmesg | grep "Command line"
[    0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-3.19.0-33-generic root=UUID=81dba11f-f76e-4ed4-8120-e6da6328b1ee ro
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.