Forrest logo
back to the dmesg tool

dmesg:tldr:ee86f

dmesg: Show kernel messages 1 page at a time.
$ dmesg | less
try on your machine

The command "dmesg | less" is used to view the system's kernel log messages.

Here's a breakdown of the command:

  • "dmesg": This command is used to display the messages generated by the kernel. It stands for "display message" and provides a way to view the kernel ring buffer.
  • "|" (pipe): This is a pipe symbol used to redirect the output of one command to another command. It takes the output of the command on the left side and passes it as input to the command on the right side.
  • "less": This is a command-line text viewer that allows you to view large amounts of text one page at a time. It enables you to scroll up and down, search for specific terms, and navigate through the output.

By combining "dmesg" with the pipe symbol and "less", the command "dmesg | less" allows you to view the kernel log messages in a more manageable way. The output of "dmesg" is passed to "less", which displays it in a paginated format, making it easier to read and browse through the log messages.

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