dmesg command

The dmesg command in Linux is used to print the kernel ring buffer (a data structure that records messages related to the operation of the kernel). During the boot process Linux displays messages destined for the kernel ring buffer. These messages sometimes scroll too quicky for you to read. You can inspect them after the boot process by using the dmesg command.

Here is an example of the dmesg command:

linux dmesg command

This command usually generates a lot of output, so you might want to redirect the output to a file or pipe it through the less program.

 

Some distributions, like Ubuntu, store the kernel ring buffer to the /var/log/dmesg file soon after the system boots, so you can read this file to inspect the boot process.

Geek University 2022