Linux dmesg – Difference Between Output of dmesg and Content of /var/log/dmesg

dmesglinux

I found the output of dmesg and content of /var/log/dmesg are different. Then what differences are between their purposes?

Best Answer

The dmesg command shows the current content of the kernel syslog ring buffer messages while the /var/log/dmesg file contains what was in that ring buffer when the boot process last completed.

Related Question