Interview Prep/Linux/Boot Process & Kernel

What are dmesg and the kernel ring buffer?

BeginnerConceptBoot Process & Kernel
Answer

The kernel logs messages (driver init, hardware errors, OOM kills, segfaults) into an in-memory ring buffer. dmesg reads it.

dmesg -T | tail -50          # human timestamps
dmesg -l err,warn
journalctl -k -b -1          # kernel messages from the previous boot
All Linux questions Roadmap: Linux

More on Boot Process & Kernel