what is dmesg command with its examples

  • About dmesg : Print or control the kernel ring buffer
  • Comes From : util-linux-ng-2.17.2

Examples :

1. To print or control the kernel ring buffer

# dmesg
# dmesg | head

2. To clear the kernel ring buffer after printing

$ dmesg -c

3. To print the raw message buffer

$ dmesg -r

4. To specify the ring buffer size

$ dmesg -s 1024

5. To set the level of logging

$ dmesg -n level
$ dmesg -n 1 (prevent all messages)

Related Commands: syslogd

Leave a Reply

Your email address will not be published. Required fields are marked *