Linux · Logging interview questions

39 Linux · Logging questions from the System Administration bank, written for Indian campus drives and tech interviews. Every question has a verified answer and an AI-tutor explanation on placd.

Free to start: the 2-minute IT readiness check — six questions and a result.

Take the free IT readiness check

or take a mock interview set up for this area

1. What does journalctl -u sshd -f do?

Junior
  1. A.follow live logs for the sshd unit
  2. B.prune the journal to a maximum size
  3. C.show logs since the last boot
  4. D.follow the system log live

Answer + AI explanation with Pro

2. Which command will follow live logs for the sshd unit?

Junior
  1. A.journalctl -u sshd -f
  2. B.journalctl --since '1 hour ago'
  3. C.journalctl -p err
  4. D.journalctl -b

Answer + AI explanation with Pro

3. Which statement is correct?

Junior
  1. A.journalctl -u sshd -f — show log entries of priority error and above
  2. B.journalctl -u sshd -f — write a custom message to the system log
  3. C.journalctl -u sshd -f — follow live logs for the sshd unit
  4. D.journalctl -u sshd -f — follow the system log live

Answer + AI explanation with Pro

4. What does journalctl -b do?

Junior
  1. A.show logs since the last boot
  2. B.show log entries of priority error and above
  3. C.print kernel ring-buffer messages
  4. D.prune the journal to a maximum size

Answer + AI explanation with Pro

5. Which command will show logs since the last boot?

Junior
  1. A.logger 'test'
  2. B.dmesg
  3. C.journalctl -u sshd -f
  4. D.journalctl -b

Answer + AI explanation with Pro

6. Which statement is correct?

Junior
  1. A.journalctl -b — print kernel ring-buffer messages
  2. B.journalctl -b — follow live logs for the sshd unit
  3. C.journalctl -b — show log entries from the last hour
  4. D.journalctl -b — show logs since the last boot

Answer + AI explanation with Pro

7. What does journalctl -p err do?

Mid
  1. A.print kernel ring-buffer messages
  2. B.follow live logs for the sshd unit
  3. C.write a custom message to the system log
  4. D.show log entries of priority error and above

Answer + AI explanation with Pro

8. Which command will show log entries of priority error and above?

Mid
  1. A.journalctl -b
  2. B.logger 'test'
  3. C.journalctl -p err
  4. D.journalctl --since '1 hour ago'

Answer + AI explanation with Pro

9. Which statement is correct?

Mid
  1. A.journalctl -p err — show log entries of priority error and above
  2. B.journalctl -p err — show log entries from the last hour
  3. C.journalctl -p err — follow live logs for the sshd unit
  4. D.journalctl -p err — write a custom message to the system log

Answer + AI explanation with Pro

10. What does dmesg do?

Junior
  1. A.show log entries of priority error and above
  2. B.prune the journal to a maximum size
  3. C.write a custom message to the system log
  4. D.print kernel ring-buffer messages

Answer + AI explanation with Pro

11. Which command will print kernel ring-buffer messages?

Junior
  1. A.tail -f /var/log/messages
  2. B.dmesg
  3. C.journalctl --since '1 hour ago'
  4. D.journalctl -b

Answer + AI explanation with Pro

12. Which statement is correct?

Junior
  1. A.dmesg — write a custom message to the system log
  2. B.dmesg — show log entries from the last hour
  3. C.dmesg — print kernel ring-buffer messages
  4. D.dmesg — prune the journal to a maximum size

Answer + AI explanation with Pro

13. What is logrotate?

Mid
  1. A.a log category like auth, cron, mail or kern
  2. B.the general system message log (RHEL)
  3. C.the tool that rotates, compresses and prunes log files
  4. D.the log file recording authentication and sudo events (RHEL)

Answer + AI explanation with Pro

14. Which term means: "the tool that rotates, compresses and prunes log files"?

Mid
  1. A./var/log/messages
  2. B./var/log/secure
  3. C.logrotate
  4. D.journald persistent storage

Answer + AI explanation with Pro

15. Which statement is correct?

Mid
  1. A.logrotate — the tool that rotates, compresses and prunes log files
  2. B.logrotate — a log category like auth, cron, mail or kern
  3. C.logrotate — the log file recording authentication and sudo events (RHEL)
  4. D.logrotate — the general system message log (RHEL)

Answer + AI explanation with Pro

16. What is /var/log/secure?

Junior
  1. A.the general system message log (RHEL)
  2. B.keeping logs across reboots by creating /var/log/journal
  3. C.a log category like auth, cron, mail or kern
  4. D.the log file recording authentication and sudo events (RHEL)

Answer + AI explanation with Pro

17. Which term means: "the log file recording authentication and sudo events (RHEL)"?

Junior
  1. A./var/log/messages
  2. B.rsyslog facility
  3. C.logrotate
  4. D./var/log/secure

Answer + AI explanation with Pro

18. Which statement is correct?

Junior
  1. A./var/log/secure — the log file recording authentication and sudo events (RHEL)
  2. B./var/log/secure — keeping logs across reboots by creating /var/log/journal
  3. C./var/log/secure — the general system message log (RHEL)
  4. D./var/log/secure — the tool that rotates, compresses and prunes log files

Answer + AI explanation with Pro

19. What does tail -f /var/log/messages do?

Junior
  1. A.show logs since the last boot
  2. B.write a custom message to the system log
  3. C.show log entries of priority error and above
  4. D.follow the system log live

Answer + AI explanation with Pro

20. Which command will follow the system log live?

Junior
  1. A.tail -f /var/log/messages
  2. B.journalctl -p err
  3. C.logger 'test'
  4. D.journalctl -b

Answer + AI explanation with Pro

21. Which statement is correct?

Junior
  1. A.tail -f /var/log/messages — follow the system log live
  2. B.tail -f /var/log/messages — write a custom message to the system log
  3. C.tail -f /var/log/messages — show log entries of priority error and above
  4. D.tail -f /var/log/messages — print kernel ring-buffer messages

Answer + AI explanation with Pro

22. What does logger 'test' do?

Junior
  1. A.print kernel ring-buffer messages
  2. B.show logs since the last boot
  3. C.follow the system log live
  4. D.write a custom message to the system log

Answer + AI explanation with Pro

23. Which command will write a custom message to the system log?

Junior
  1. A.journalctl --vacuum-size=500M
  2. B.journalctl --since '1 hour ago'
  3. C.tail -f /var/log/messages
  4. D.logger 'test'

Answer + AI explanation with Pro

24. Which statement is correct?

Junior
  1. A.logger 'test' — write a custom message to the system log
  2. B.logger 'test' — prune the journal to a maximum size
  3. C.logger 'test' — follow the system log live
  4. D.logger 'test' — show logs since the last boot

Answer + AI explanation with Pro

25. What does journalctl --vacuum-size=500M do?

Mid
  1. A.prune the journal to a maximum size
  2. B.show log entries from the last hour
  3. C.show logs since the last boot
  4. D.show log entries of priority error and above

Answer + AI explanation with Pro

26. Which command will prune the journal to a maximum size?

Mid
  1. A.journalctl --vacuum-size=500M
  2. B.tail -f /var/log/messages
  3. C.logger 'test'
  4. D.journalctl --since '1 hour ago'

Answer + AI explanation with Pro

27. Which statement is correct?

Mid
  1. A.journalctl --vacuum-size=500M — print kernel ring-buffer messages
  2. B.journalctl --vacuum-size=500M — follow the system log live
  3. C.journalctl --vacuum-size=500M — prune the journal to a maximum size
  4. D.journalctl --vacuum-size=500M — show log entries from the last hour

Answer + AI explanation with Pro

28. What does journalctl --since '1 hour ago' do?

Mid
  1. A.prune the journal to a maximum size
  2. B.write a custom message to the system log
  3. C.follow live logs for the sshd unit
  4. D.show log entries from the last hour

Answer + AI explanation with Pro

29. Which command will show log entries from the last hour?

Mid
  1. A.journalctl --vacuum-size=500M
  2. B.journalctl --since '1 hour ago'
  3. C.journalctl -p err
  4. D.journalctl -b

Answer + AI explanation with Pro

30. Which statement is correct?

Mid
  1. A.journalctl --since '1 hour ago' — follow the system log live
  2. B.journalctl --since '1 hour ago' — show log entries from the last hour
  3. C.journalctl --since '1 hour ago' — follow live logs for the sshd unit
  4. D.journalctl --since '1 hour ago' — print kernel ring-buffer messages

Answer + AI explanation with Pro

Showing 30 of 39 Linux · Logging questions — the full set, with answers, explanations and an AI tutor on every question, is inside.

Free to start

Start with a free readiness check

Sign up free for the 2-minute IT readiness check and a scored result. Answers, explanations and the AI tutor on every Linux · Logging question come with Pro.

Take the free IT readiness check

or take a mock interview set up for this area

24,000+ questions & coding problemsSoftware & IT16,274 questionsGovernment jobs26 examsAptitudenew questions every timeAI practice interviewwith feedback65 topics to practiseMechanical1,149 questionsGATE ME9 papersEngineering Mathematics381 questions2-minute checkfreeDSA Problems1,422Civil1,005 questionsGATE CE9 papersCS Fundamentals1,209 questionsYour scores6 skillsSystem Design25Electrical / EEE1,047 questionsGATE EE9 papersRun your codeC++ · Java · PythonLow-Level Design144Electronics & Comm.975 questionsGATE EC9 papersAI help on every questionFull-Stack6,282Chemical1,005 questionsGATE CH9 papersAI whiteboardsystem designWork abroadEurope · remote · transfersESE ME1 paperGATE practice papers2019–2026ESE CE1 paperDate alertsbefore the last dateESE EE1 paperBehavioural courseHR round practiceESE ET1 paperResume optimizerProSSC JE ME1 paperApplication trackerSSC JE CE1 paperCompany-wise prepSSC JE EE1 paperRole roadmapsRRB JE1 subjectPriced in ₹UPI · cardsISRO SC1 paperGATE CS9 papersIBPS SO IT1 paperUGC NET CS1 paperSSC CGL26 papersIBPS PO26 papersRRB NTPC26 papersSSC CHSL26 papersIBPS Clerk26 papersSBI Clerk26 papersRRB Group D26 papersSSC CPO26 papersSSC GD26 papers