Bird
0
0

What will be the output of the command dmesg | grep usb?

medium📝 Command Output Q13 of 15
Linux CLI - System Administration
What will be the output of the command dmesg | grep usb?
AAll kernel messages containing the word 'usb'
BOnly USB device names without any messages
CA list of all running USB processes
DAn error because grep cannot be used with dmesg
Step-by-Step Solution
Solution:
  1. Step 1: Understand the pipe and grep usage

    The command pipes dmesg output to grep usb, filtering lines containing 'usb'.
  2. Step 2: Interpret the filtered output

    This shows kernel messages related to USB devices or events, not just names or processes.
  3. Final Answer:

    All kernel messages containing the word 'usb' -> Option A
  4. Quick Check:

    dmesg | grep filters messages by keyword [OK]
Quick Trick: Pipe dmesg to grep to filter messages by keyword [OK]
Common Mistakes:
  • Thinking grep lists processes
  • Expecting only device names without messages
  • Assuming grep causes errors with dmesg

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes