Recall & Review
beginner
What does the
dmesg command do in Linux?The
dmesg command shows kernel messages, which are system-level logs about hardware and drivers during boot and runtime.Click to reveal answer
beginner
How can you view the latest kernel messages using
dmesg?Simply run
dmesg in the terminal to see all kernel messages, with the newest messages usually at the bottom.Click to reveal answer
intermediate
How do you filter
dmesg output to show only messages related to USB devices?You can use
dmesg | grep -i usb to show only kernel messages that mention USB devices.Click to reveal answer
intermediate
What is the purpose of the
-T option in dmesg?The
-T option shows human-readable timestamps instead of raw kernel time, making it easier to understand when events happened.Click to reveal answer
beginner
Why might you need to run
dmesg with sudo?Some systems restrict access to kernel logs, so running
sudo dmesg gives you permission to see all messages.Click to reveal answer
What kind of messages does
dmesg display?✗ Incorrect
dmesg shows kernel and hardware-related messages, not user or application logs.
Which command filters
dmesg output to show only USB-related messages?✗ Incorrect
Using grep after dmesg filters the output for 'usb'.
What does the
-T option do in dmesg?✗ Incorrect
The -T option converts kernel timestamps to readable date and time.
Why might
dmesg require sudo to run fully?✗ Incorrect
Access to kernel logs is often limited to root users for security reasons.
Where are
dmesg messages usually stored?✗ Incorrect
dmesg reads from the kernel ring buffer and logs may be saved in /var/log/dmesg.
Explain what the
dmesg command is used for and how it helps in troubleshooting.Think about what happens when your computer starts and how you check hardware problems.
You got /4 concepts.
Describe how you would find USB device messages using
dmesg and why filtering output is useful.Imagine looking for a needle in a haystack of logs.
You got /4 concepts.