LFCS Service Configuration Practice Question
Exhibit
myapp.service - My Custom Application Loaded: loaded (/etc/systemd/system/myapp.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Mon 2025-03-10 14:23:45 UTC; 2min ago Process: 4567 ExecStart=/usr/bin/myapp (code=exited, status=1/FAILURE) Main PID: 4567 (code=exited, status=1/FAILURE)
Refer to the exhibit. A Linux administrator sees that 'myapp.service' is in a failed state with exit status 1. To troubleshoot, which command should the administrator use to view the full error output that the service produced before exiting?
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
journalctl -u myapp.service
The journalctl command with the -u option shows all logs for the specified unit, including stdout/stderr captured by systemd. systemctl status only shows a brief log tail; restarting would remove the current state; reload does not affect failed units.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
systemctl status myapp.service
Why it's wrong here
This shows limited log lines; for full output, journalctl is needed.
- ✗
systemctl reload myapp.service
Why it's wrong here
Reload applies to running services, not failed ones.
- ✓
journalctl -u myapp.service
Why this is correct
Correct: journalctl -u shows the complete journal for the unit, including all error output.
- ✗
systemctl restart myapp.service
Why it's wrong here
Restarting will attempt to start the service again but does not show the original error output.
Go deeper
Related to this question
About these practice questions
This LFCS question is part of Courseiva's 507-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This LFCS practice question is part of Courseiva's free Linux Foundation certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the LFCS exam.