Linux Survival Basics
Read-onlyInspect One Service Without Pager Traps
systemctl status can open a pager, wrap awkwardly, or hide the prompt during a tense server check.
Command
systemctl status nginx --no-pager --lines=30
Before you run this
System impact: Read-only. Low when scoped to the shown target.
When not to use it: Do not use when you need long historical logs; use journalctl for a wider time range.
Expected output
Active state, main PID, memory, and recent service lines.
System impact
Read-only. Nothing changes. systemd prints the service state, main PID, resource summary, and recent logs.
Recovery / rollback: no state is changed.
When to use it
Use when confirming whether a specific service is active, failed, restarting, or blocked on startup.
When not to use it
Do not use when you need long historical logs; use journalctl for a wider time range.
Watch this command run
Command transcript
This sanitized transcript shows the commands and output shape without exposing host details.
$ 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
$ systemctl is-active nginx
active
View commands shown
These are the commands shown in the sanitized transcript.
Commands shown
systemctl status nginx --no-pager --lines=30systemctl is-active nginx
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
Read Current-Boot Logs for One Service
Ignore stale logs and inspect only what happened since this boot.
journalctl -u nginx -b --no-pager -n 80
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
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.
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.