Forrest logo
back to the dmesg tool

dmesg:tldr:12457

dmesg: Show kernel messages and keep reading new ones, similar to `tail -f` (available in kernels 3.5.0 and newer).
$ dmesg -w
try on your machine

The command "dmesg -w" is used to continuously monitor and display the kernel log messages on a Unix-like operating system.

Here's a breakdown of the command:

  • "dmesg": It is short for "display message" and is a command-line utility that shows the kernel ring buffer messages. The kernel ring buffer contains important information about the system's hardware, device drivers, and kernel events.

  • "-w": It stands for "watch" and is an option for the "dmesg" command. When used with "dmesg", it enables continuous monitoring of the kernel log messages. Instead of displaying messages once and exiting, it keeps the command running and updates the output as new log messages come in. This is particularly useful if you want to monitor the system in real-time for any kernel-related issues or hardware events.

Overall, "dmesg -w" is useful for sysadmins, developers, or users who need to keep an eye on the kernel log messages as they occur.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the dmesg tool