Linux Survival Basics
Read-onlyInspect the Unit File and Drop-ins Together
A service definition looks correct in the main unit, but a drop-in override may be changing the user, environment, or command.
Command
systemctl cat app-worker
Before you run this
System impact: Read-only. Low when scoped to the shown target.
When not to use it: Do not edit from memory after reading this; make a deliberate unit or drop-in change and reload systemd when applying a fix.
Expected output
The main service unit followed by drop-in override contents.
System impact
Read-only. Nothing changes. systemctl prints the effective unit file fragments and drop-ins in order.
Recovery / rollback: no state is changed.
When to use it
Use when status mentions a drop-in, a service changed after deployment, or the failure points at user, path, environment, or ExecStart.
When not to use it
Do not edit from memory after reading this; make a deliberate unit or drop-in change and reload systemd when applying a fix.
next steps
Related commands
Compare Failure Output With the Effective Unit
Put the failed step next to the unit config that created it.
systemctl status app-worker --no-pager --lines=50 && systemctl cat app-worker
Show systemd Timer Unit File
The calendar expression lives in the timer unit.
systemctl cat backup.timer
Read the Failure Cause in systemctl Status
The status page often tells you the failed startup step before you open every log.
systemctl status app-worker --no-pager --lines=50
Reset Failed State After Capturing Evidence
Clear the red failed state only after you have captured the evidence.
systemctl reset-failed app-worker
Print the Exact systemd Exit Fields
Turn a noisy service failure into four fields you can paste into an incident note.
systemctl show app-worker --property=Result,ExecMainCode,ExecMainStatus,NRestarts --no-pager
Study mapping
Use this as independent command practice: read the notes, predict the output, then compare it with the example before using a real shell.
Independent study support only. No affiliation, endorsement, exam dumps, or real exam questions.