Back to commands

Linux Survival Basics

Read-only

Read the Failure Cause in systemctl Status

A systemd service is failed and you need the active state, exit status, unit paths, and the most recent failure lines in one read-only check.

Command

systemctl status app-worker --no-pager --lines=50

Before you run this

System impact: Read-only. Low when scoped to the shown target.

When not to use it: Do not stop at status when the failure is intermittent, old, or missing context; follow up with journalctl and systemctl show.

Expected output

A failed active state, Result value, ExecStart exit status, and recent lines showing the failing startup step.

System impact

Read-only. Nothing changes. systemctl prints service metadata, process exit status, and recent journal lines.

Recovery / rollback: no state is changed.

When to use it

Use first when a specific service is failed and you need a fast summary before deeper journal or unit-file inspection.

When not to use it

Do not stop at status when the failure is intermittent, old, or missing context; follow up with journalctl and systemctl show.

next steps

Related commands

Linux Survival Basics Read-only

Inspect One Service Without Pager Traps

Make systemctl status safe for scripts, screenshots, and quick incident notes.

systemctl status nginx --no-pager --lines=30
Linux Survival Basics Read-only

Read One systemd Timer Status

Timer status shows whether the schedule is loaded and active.

systemctl status backup.timer --no-pager
Linux Survival Basics Read-only

Check logrotate Timer Status

The timer may be disabled, missed, or failing.

systemctl status logrotate.timer --no-pager
Linux Survival Basics Read-only

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
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.

  • LPIC-1 style command-line practice
  • LFCS style performance-task practice
  • Linux+ style troubleshooting review

Independent study support only. No affiliation, endorsement, exam dumps, or real exam questions.