Linux Survival Basics
Read-onlyReset Failed State After Capturing Evidence
systemctl --failed still shows an old service failure after the issue was fixed, and you need to clear the recorded failed state deliberately.
Command
systemctl reset-failed app-worker
Before you run this
System impact: Read-only. Low when scoped to the shown target.
When not to use it: Do not run it before collecting status and journal evidence, and do not confuse clearing state with fixing the service.
Expected output
Either no output or a short confirmation that the failed state was reset.
System impact
Read-only. systemd clears the recorded failed state for the service, so future --failed output reflects new failures.
When to use it
Use after documenting or fixing a failure when the failed state itself is stale noise.
When not to use it
Do not run it before collecting status and journal evidence, and do not confuse clearing state with fixing the service.
Recovery / rollback
There is no meaningful undo for clearing the marker; use saved logs or incident notes for prior evidence.
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
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
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
Inspect the Unit File and Drop-ins Together
The bug may be in an override file, not the main unit.
systemctl cat app-worker
Check If a Service Is Active
Get a clean yes-or-no service state without the full status page.
systemctl is-active nginx
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.