Usage And Variation

  1. dmesg -c Clears logs of previous test results.
  2. dmest | grep -i usb Filter results by searching for a specific driver/device, such as a usb in this case, by using the grep command. The -i flag disregards capitalization.

What is the DMESG command?

The kernel is the core of an operating system, being the first part that is loaded into memory when a machine boots up. Dmesg allows a user to view the kernel messages that detect whether a device is functioning properly or not. This command is convenient when troubleshooting, debugging, or diagnosing hardware/device issues, as it gives the user details about hardware drivers that are loaded into the kernel.



In the example above, the user issues the command without any arguements or flags. What results is a massive list of system status updates and checks that can be used to diagnose isseus with connected devices or other pieces of the system. The green number on the left of the output is the timestamp of when these events occurred upon running the diagnostics.

Try it: