Show the latest kernel messages
Build a paste-ready command, then review its compatibility and effects before running it.
cautionrequires privileges Compatibility
LinuxVerified for Linux using posix, bash, zsh syntax.
Operational knowledgereview due 2027-01-19
Requirementsdmesgdmesg must be installed and available on PATH.Elevated accessReview the exact scope before using an elevated account.
Version supportdmesg Current supported releasesVerified for linux using posix, bash, zsh syntax; consult compatibility notes for platform-specific differences.
Expected signals[948322.104812] usb 1-2: new high-speed USB device number 8 using xhci_hcdRepresentative successful output; values vary with the selected target and system state.
Known errorsdmesg: command not founddmesg is missing or is not available on PATH.Permission deniedThe current identity does not have the required access.
Verifydmesg | tail -30Re-run the corresponding read-only inspection and confirm the intended state.Rollback noteNo universal automatic rollback is available. Capture the current state and use the tool-specific recovery procedure before applying changes.
Command breakdown
01dmesgCommandRuns the dmesg stage of this one-liner.
02|PipelinePasses the output on the left to the command on the right.
03tailCommandRuns the tail stage of this one-liner.
04-30OptionConfigures tail with the -30 option.
Example input
dmesg | tail -30
Example output
[948322.104812] usb 1-2: new high-speed USB device number 8 using xhci_hcd
[948322.253041] usb-storage 1-2:1.0: USB Mass Storage device detected
[948323.281790] sd 6:0:0:0: [sdb] Attached SCSI removable disk
Illustrative output — exact values vary by system and data.
Official sources