info > DMESG

๐Ÿ“– NAME

dmesg - print or control the kernel ring buffer

๐Ÿš€ Quick Reference

Use CaseCommandDescription
๐Ÿ” View all kernel messagesdmesgDisplay all messages from the kernel ring buffer
๐Ÿ‘๏ธ Human-readable outputdmesg -HEnable human-readable output with timestamps and pager
๐Ÿ”„ Follow new messagesdmesg -wWait for new messages (requires /dev/kmsg)
๐Ÿงน Clear ring bufferdmesg -CClear the ring buffer
๐Ÿ“– Read & cleardmesg -cPrint then clear the ring buffer
๐Ÿ”‡ Console offdmesg -DDisable printing of messages to console
๐Ÿ”Š Console ondmesg -EEnable printing of messages to console
๐ŸŽจ Colorized outputdmesg -L alwaysColorize the output
โฑ๏ธ Human-readable timestampsdmesg -TPrint human-readable timestamps (may be inaccurate)
๐Ÿ“ Read from filedmesg -F fileRead syslog messages from a file (old format only)
๐Ÿ” Filter by leveldmesg --level=err,warnShow only error and warning messages
๐Ÿ” Filter by facilitydmesg --facility=daemonShow only daemon messages

๐Ÿ“‹ SYNOPSIS

dmesg [options]

dmesg --clear

dmesg --read-clear [options]

dmesg --console-level level

dmesg --console-on

dmesg --console-off

๐Ÿ“ DESCRIPTION

dmesg is used to examine or control the kernel ring buffer.

The default action is to display all messages from the kernel ring buffer.

โš™๏ธ OPTIONS

The --clear, --read-clear, --console-on, --console-off, and --console-level options are mutually exclusive.

๐ŸŽจ COLORS

Implicit coloring can be disabled by an empty file /etc/terminal-colors.d/dmesg.disable. See terminal-colors.d(5) for more details about colorization configuration.

The logical color names supported by dmesg are:

๐Ÿšช Exit Codes

dmesg can fail reporting permission denied error. This is usually caused by dmesg_restrict kernel setting, please see syslog(2) for more details.

๐Ÿ‘ฅ AUTHORS

Karel Zak <kzak@redhat.com>

dmesg was originally written by Theodore Ts'o <tytso@athena.edu>.

๐Ÿ“š SEE ALSO

๐Ÿ› REPORTING BUGS

For bug reports, use the issue tracker at https://github.com/karelzak/util-linux/issues.

๐Ÿ“ฆ AVAILABILITY

The dmesg command is part of the util-linux package which can be downloaded from Linux Kernel Archive <https://www.kernel.org/pub/linux/utils/util-linux/>.

util-linux 2.37.2 2021-07-20 DMESG(1)

DMESG
๐Ÿ“– NAME ๐Ÿš€ Quick Reference ๐Ÿ“‹ SYNOPSIS ๐Ÿ“ DESCRIPTION โš™๏ธ OPTIONS ๐ŸŽจ COLORS ๐Ÿšช Exit Codes ๐Ÿ‘ฅ AUTHORS ๐Ÿ“š SEE ALSO ๐Ÿ› REPORTING BUGS ๐Ÿ“ฆ AVAILABILITY

Generated by phpman v4.9.26-5-g7740029 Author: Che Dong Under GNU General Public License
2026-08-16 09:45 @2600:1f28:365:80b0:7cb9:fb:26c1:e368
CrawledBy CCBot/2.0 (https://commoncrawl.org/faq/)
Valid XHTML 1.0 Transitional!Valid CSS!