LPIC-2 Linux Kernel and System Startup Practice Question
A system administrator is troubleshooting a hardware issue that occurs during boot. To monitor the kernel messages in real-time, which command should be run?
⚠ Common exam trap
Many exam-takers confuse `journalctl -f` (which shows all logs including kernel ones) with the more direct `dmesg -w` for kernel-specific real-time monitoring, especially during early boot when systemd may not be fully operational.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
dmesg -w
`dmesg -w` (or `dmesg --follow`) provides real-time monitoring of kernel ring buffer messages, which is essential for troubleshooting hardware issues during boot. The `-w` flag waits for new messages and prints them as they appear, similar to `tail -f`, but specifically for kernel messages. This command directly accesses the kernel ring buffer via `/dev/kmsg`, ensuring you see hardware-related errors, driver messages, and device initialization logs as they occur.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
journalctl -f
Why it's wrong here
journalctl -f follows all system logs, not only kernel messages, and may not show early boot messages.
- ✗
tail -f /var/log/kern.log
Why it's wrong here
tail -f follows a log file, but kernel messages are not always written to /var/log/kern.log immediately or at all.
- ✓
dmesg -w
Why this is correct
dmesg -w shows kernel ring buffer messages in real-time; it's the standard tool for kernel messages.
- ✗
less /var/log/messages
Why it's wrong here
less views a static file, not real-time.
Go deeper
Related to this question
About these practice questions
One of 507 original LPIC-2 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This LPIC-2 practice question is part of Courseiva's free LPI certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the LPIC-2 exam.