journalctl Interview Questions and Answers¶
Introduction¶
These questions test whether you understand what journalctl does, when to use it, and how to verify the result on Linux.
Beginner Questions¶
What does journalctl do?
It queries logs from the systemd journal.
Show a basic command.
journalctl -n 50
Intermediate Questions¶
Name useful options.
-u: filter by systemd unit.-f: follow new log entries.--since: filter by time.
Show a common administrator command.
journalctl -u sshd
Scenario-Based Questions¶
How would you handle journalctl follow logs?
journalctl -u sshd -f
What would you verify afterward?
journalctl --disk-usage
Expected output should look similar to:
Archived and active journals take up 256.0M in the file system.
Practical Task Questions¶
Practice in a lab by running a safe version of the command, explaining the target, and showing the verification output.
Quick Review¶
journalctl -n 50
journalctl -u sshd
journalctl --disk-usage
Related Guides¶
- What is journalctl?
- journalctl examples
- journalctl follow logs explained
- journalctl Filter by Service and Time
Summary¶
A strong journalctl answer includes the purpose, a correct example, a common mistake, and a verification command with output you can interpret.