Hosting Operations
Read-onlyPrint Runtime Paths and User From systemd
A service failure points at credentials or paths, and you need systemd's resolved unit properties without reading multiple files manually.
Command
systemctl show app-worker --property=FragmentPath,DropInPaths,EnvironmentFiles,ExecStart,User,WorkingDirectory --no-pager
Before you run this
System impact: Read-only. Low when scoped to the shown target.
When not to use it: Do not assume these values prove the files exist or permissions are correct; follow up with ls, stat, getent, or namei as needed.
Expected output
Selected unit properties showing fragment paths, drop-ins, environment files, ExecStart, User, and WorkingDirectory.
System impact
Read-only. Nothing changes. systemctl prints selected runtime configuration properties.
Recovery / rollback: no state is changed.
When to use it
Use when a service fails at USER, CHDIR, EXEC, environment-file loading, or after a deploy that changed paths.
When not to use it
Do not assume these values prove the files exist or permissions are correct; follow up with ls, stat, getent, or namei as needed.
next steps
Related commands
Check Failed Dependencies for a Service
Sometimes the service is only the messenger for a failed dependency.
systemctl list-dependencies app-worker --failed --no-pager
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
Find the First Failure Line for One Unit
The first failure line is often more useful than the last restart message.
journalctl -u app-worker -b --no-pager -o short-iso | grep -m1 -E 'ERROR|Failed|status='
Build a Restart Loop Timeline
Restart loops make more sense when you line up starts, failures, and counters.
journalctl -u app-worker -b --no-pager -o short-iso | grep -E 'Started|Failed|Scheduled restart|Main process exited'
Read Warning and Error Logs for One Failed Unit
Filter a failed unit's journal to the lines most likely to explain the stop.
journalctl -u app-worker -b -p warning..alert --no-pager -n 80
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.