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.
- Users report that an application is very slow, and top shows high I/O wait with low CPU use. What is the most likely bottleneck?
- A server can reach other hosts by IP address but name lookups fail. Which file should be checked first for the resolver configuration?
- An administrator needs to see which block devices are attached, with their sizes and mount points, in a tree. Which command does that?
- A new disk partition has been formatted and must be mounted at boot. Which file should the administrator add an entry to?
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.