Forrest logo
back to the dmesg tool

dmesg:tldr:0f24c

dmesg: Show how much physical memory is available on this system.
$ dmesg | grep -i memory
try on your machine

The command "dmesg | grep -i memory" is used to filter the output of the "dmesg" command and show only the lines containing the word "memory", regardless of the case (thanks to the "-i" option).

Here's a breakdown of the command:

  • "dmesg": This command displays the kernel ring buffer messages, which contain information about the system hardware, device drivers, and other kernel-related events.
  • "|": This is a pipe symbol that directs the output of the command on the left to the command on the right.
  • "grep": This command is used to search for specific patterns or words in the given input.
  • "-i": This option makes the grep command case-insensitive, meaning it will match "memory" regardless of whether it's in uppercase or lowercase.
  • "memory": This is the pattern or word that grep will search for in the output of the "dmesg" command.

So, the overall command will display only the lines of the dmesg output that contain the word "memory".

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