Operations 4 min read

Master Linux Boot Logs: How to Use dmesg to Inspect and Manage System Messages

Learn how to display, filter, and clear Linux kernel boot messages using the dmesg command, understand its options such as -c, -n, -r, and -s, and see practical examples for checking system startup, disk, and memory information.

Open Source Linux
Open Source Linux
Open Source Linux
Master Linux Boot Logs: How to Use dmesg to Inspect and Manage System Messages

dmesg: Display Boot Information

Use the dmesg command to show system boot messages. The kernel stores these messages in a ring buffer, also saved in /var/log/dmesg . Drivers and hardware modules print information that can be viewed with dmesg.

Command Syntax

dmesg [options]

Option Meanings

The options are:

-c – display messages then clear the ring buffer.

-n <level> – set the logging level.

-r – print the raw message buffer.

-s <size> – set buffer size (default 8196 bytes).

Examples

(1) Show all boot messages # dmesg (2) View basic disk information # dmesg | grep sda (3) View basic memory information # dmesg | grep memory (4) Clear the dmesg ring buffer

# dmesg -c
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

LinuxSystem Administrationdmesgboot logs
Open Source Linux
Written by

Open Source Linux

Focused on sharing Linux/Unix content, covering fundamentals, system development, network programming, automation/operations, cloud computing, and related professional knowledge.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.