O'Reilly logo

Linux® Desk Reference, Second Edition by Scott Hawkins

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Commands

dmesg

[ -c ] [ -n level ] [ -s bufsize ]

This command is used to display or control the contents of the kernel ring buffer, which contains the bootup messages.

Example: To get the boot messages from your last system startup, use

dmesg | less

Example: To set your console to display messages with annoying frequency, use

dmesg -n 3

-c Clear the contents of the ring buffer after printing.
-sbufsize Specify the size of the buffer used to query the kernel ring buffer. Default is 8196.
-nlevel Specify the level at which log messages are displayed to the console. Note that messages are sent to /proc/kmsg regardless of level. Typically, this is set to 1, which filters all but panic messages.

halt

[-n] [-w] [-d] [-f] [-i] [-p]

reboot

[-n] [-w] ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required