Bird
0
0

You want to see logs for the docker.service but accidentally run journalctl -u docker. Why might this fail?

medium📝 Debug Q7 of 15
Linux CLI - System Administration
You want to see logs for the docker.service but accidentally run journalctl -u docker. Why might this fail?
Adocker.service is not a valid systemd unit
BThe -u option requires a full path
CMissing .service suffix causes no logs to show
Djournalctl does not support filtering by service
Step-by-Step Solution
Solution:
  1. Step 1: Understand -u option usage

    The -u option expects the full unit name, including suffix like .service.
  2. Step 2: Identify the error

    Using just 'docker' without '.service' may cause no logs to appear.
  3. Final Answer:

    Missing .service suffix causes no logs to show -> Option C
  4. Quick Check:

    Always include full unit name with suffix for -u [OK]
Quick Trick: Always use full unit name with .service for -u option [OK]
Common Mistakes:
  • Omitting .service suffix
  • Thinking -u needs full path
  • Assuming docker.service doesn't exist

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes