System Info

dmesg

Print kernel ring buffer messages for hardware and driver diagnostics.

Synopsis

syntax
dmesg [OPTION]...

Examples

Show recent kernel messages
dmesg | tail -30
Show messages with readable timestamps
dmesg -T
Show only errors and warnings
dmesg -l err,warn
Follow kernel messages in human-readable format
sudo dmesg -wH

Common options

FlagDescription
-HHuman-readable output with timestamps
-TPrint human-readable timestamps
-lFilter by log level
-wFollow new messages
--colorColorize output

About dmesg

The `dmesg` command print kernel ring buffer messages for hardware and driver diagnostics. System information commands provide insight into hardware, kernel, memory, disk, and user session details.

These are typically the first tools you reach for when diagnosing system problems, capacity planning, or auditing a server's configuration. They work across most Linux distributions without additional packages.

The command accepts 5 commonly used flags shown above, though the full set of options is available in the man page (`man dmesg`). The 4 examples on this page cover typical real-world usage patterns that you can copy and adapt for your own workflows.

Related commands

More System Info Commands

Other commands in the System Info category

Related tools