Linux Survival Basics
Read-onlyPrint the Exact systemd Exit Fields
Full status output is useful for humans, but incident notes and scripts need compact fields like Result, ExecMainStatus, and restart count.
Command
systemctl show app-worker --property=Result,ExecMainCode,ExecMainStatus,NRestarts --no-pager
Before you run this
System impact: Read-only. Low when scoped to the shown target.
When not to use it: Do not treat numeric status values as self-explanatory; pair them with status or journal lines.
Expected output
Result, ExecMainCode, ExecMainStatus, and NRestarts property lines.
System impact
Read-only. Nothing changes. systemctl show prints selected unit properties.
Recovery / rollback: no state is changed.
When to use it
Use when documenting a failure, comparing before and after recovery, or writing a runbook check.
When not to use it
Do not treat numeric status values as self-explanatory; pair them with status or journal lines.
next steps
Related commands
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
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
Inspect One Service Without Pager Traps
Make systemctl status safe for scripts, screenshots, and quick incident notes.
systemctl status nginx --no-pager --lines=30
Show a Service LimitNOFILE
A shell ulimit is not the service limit.
systemctl show nginx -p LimitNOFILE --no-pager
Print Runtime Paths and User From systemd
Confirm the user, working directory, env file, and ExecStart systemd is actually using.
systemctl show app-worker --property=FragmentPath,DropInPaths,EnvironmentFiles,ExecStart,User,WorkingDirectory --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.