Linux Survival Basics
Read-onlyShow Failed systemd Units
A VPS feels unhealthy, but checking services one by one wastes time and misses failed timers, mounts, and sockets.
Command
systemctl --failed --no-pager
Before you run this
System impact: Read-only. Low when scoped to the shown target.
When not to use it: Do not use it as the only health check; a service can be running but still misconfigured or returning bad responses.
Expected output
Failed unit rows such as backup.service or app-worker.service.
System impact
Read-only. Nothing changes. The command prints units whose current systemd state is failed.
Recovery / rollback: no state is changed.
When to use it
Use after deploys, reboots, package upgrades, or alerts when you need the fastest systemd health snapshot.
When not to use it
Do not use it as the only health check; a service can be running but still misconfigured or returning bad responses.
Watch this command run
Command transcript
This sanitized transcript shows the commands and output shape without exposing host details.
$ systemctl --failed --no-pager
UNIT LOAD ACTIVE SUB DESCRIPTION
backup.service loaded failed failed Nightly backup job
app-worker.service loaded failed failed App background worker
2 loaded units listed.
$ systemctl status nginx --no-pager --lines=30
● nginx.service - A high performance web server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled)
Active: active (running) since Thu 2026-06-25 14:12:10 CDT; 18min ago
Main PID: 842 (nginx)
Tasks: 3
Memory: 12.4M
Jun 25 14:12:10 vps nginx[842]: start worker processes
Jun 25 14:12:11 vps nginx[842]: ready for connections
View commands shown
These are the commands shown in the sanitized transcript.
Commands shown
systemctl --failed --no-pagersystemctl status nginx --no-pager --lines=30
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
Map systemd Timers to Services
A timer is only half the scheduled job. The service is the payload.
systemctl list-timers --all --no-pager --plain | awk 'NR==1 || /\.timer/ {print $(NF-1), "->", $NF}'
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
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
List Upcoming systemd Timers
Cron is not the only scheduler on modern Linux servers.
systemctl list-timers --all --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.
Useful for
- LPIC-1 style command-line practice
- LFCS style performance tasks
- Linux+ style troubleshooting review
Independent study support only. No affiliation, endorsement, exam dumps, or real exam questions.