Skip to content

Linux+ XK0-006 practice question 13: Troubleshooting

A service fails to start after a reboot. Which command gives the most direct view of its recent log messages on a systemd host?

The options

  • A. history
  • B. journalctl -u servicename -b
  • C. cat /etc/hostname
  • D. uptime

Answer and why

The correct answer is B: journalctl -u servicename -b

A. History lists shell commands and not service messages.

B. This shows the unit's journal entries for the current boot, where the failure reason is usually logged.

C. This prints the host name and says nothing about the failure.

D. Uptime shows load averages and how long the system has been running.

What Troubleshooting tests

Troubleshooting is the largest practical skill: reading logs, finding resource exhaustion and tracing network and permission failures. The right first step is the one that gathers evidence before changing anything.

Troubleshooting is 22% of the XK0-006 exam. The exam has 90 questions in 90 minutes, so this question is a slice of the real mix, not a prediction of your result.

Try these next

Each one is a free question from the same practice test, with the answer and the reason for every option on its own page.

Keep going

This is question 13 of 15 in the free Linux+ XK0-006 practice test. If you missed it, say why in one sentence before you read on: the reason is what transfers to a differently worded question.