whatis dmesg
dmesg
Also known as: kernel ring buffer
The command that prints the kernel ring buffer: messages about hardware detection, drivers, and errors since boot.
What Is dmesg in Linux?
dmesg is the first place to look when a disk, USB device, or driver misbehaves. Messages include timestamps relative to boot; -T converts them to human time and -w follows new messages live.
On systemd machines, journalctl -k shows the same kernel messages and can reach back to previous boots.
Example
sudo dmesg -T --level=err,warn
sudo dmesg -w Learn more about dmesg
- dmesg Explained: Reading Kernel Messages When Hardware Misbehaves When a disk fails, a USB device does not enumerate, or the kernel kills a process for using too much memory, it says so in the kernel ring buffer. dmesg is how you read it.