2025-03-14 21:59:59 -06:00
|
|
|
# dmesg
|
|
|
|
|
|
|
|
|
|
> Write the kernel messages to `stdout`.
|
2025-12-16 10:20:31 -07:00
|
|
|
> See also: `journalctl`.
|
2025-03-14 21:59:59 -06:00
|
|
|
> More information: <https://manned.org/dmesg>.
|
|
|
|
|
|
|
|
|
|
- Show kernel messages:
|
|
|
|
|
|
|
|
|
|
`sudo dmesg`
|
|
|
|
|
|
2026-07-08 16:22:34 -06:00
|
|
|
- Show kernel messages in human-readable format (equivalent of `dmesg --color --reltime` piped to a pager):
|
|
|
|
|
|
|
|
|
|
`sudo dmesg {{[-H|--human]}}`
|
|
|
|
|
|
2025-03-14 21:59:59 -06:00
|
|
|
- Show kernel error messages:
|
|
|
|
|
|
2025-03-19 19:23:44 -06:00
|
|
|
`sudo dmesg {{[-l|--level]}} err`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
2026-07-08 16:22:34 -06:00
|
|
|
- Show kernel messages and keep [w]aiting for new ones (similar to `tail --follow`):
|
2025-03-14 21:59:59 -06:00
|
|
|
|
2025-03-19 19:23:44 -06:00
|
|
|
`sudo dmesg {{[-w|--follow]}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
2026-07-08 16:22:34 -06:00
|
|
|
- Show kernel messages emitted in the last hour:
|
2025-03-14 21:59:59 -06:00
|
|
|
|
2026-07-08 16:22:34 -06:00
|
|
|
`sudo dmesg --since "1 hour ago"`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
2026-07-08 16:22:34 -06:00
|
|
|
- Show kernel messages with timestamps as differences from local time:
|
2025-03-14 21:59:59 -06:00
|
|
|
|
2026-07-08 16:22:34 -06:00
|
|
|
`sudo dmesg {{[-e|--reltime]}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
2026-07-08 16:22:34 -06:00
|
|
|
- Show kernel messages with a timestamp for each message:
|
2025-03-14 21:59:59 -06:00
|
|
|
|
2025-03-19 19:23:44 -06:00
|
|
|
`sudo dmesg {{[-T|--ctime]}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
2026-07-08 16:22:34 -06:00
|
|
|
- Colorize output:
|
2025-03-14 21:59:59 -06:00
|
|
|
|
2025-03-19 19:23:44 -06:00
|
|
|
`sudo dmesg {{[-L|--color]}}`
|