systemctl status: Check a Service's State and Logs

Inspect any systemd unit's loaded/enabled state, active state, main PID, and its most recent log lines in one command.

LinuxsystemdtroubleshootingserviceMedium risk
Run systemctl status nginx to see whether the unit is loaded and enabled, whether it is active (running), its main PID, and the latest journal lines.

01Command

Command
$ systemctl status nginx

02What it does

systemctl status answers three questions at once. "Loaded" shows whether the unit file was read and whether it is enabled/disabled (i.e., will it start at boot); "Active" shows whether it is running now, since when, and the main PID; the final block shows the most recent log entries from the journal. Exit code note for scripts: status returns 0 for a running unit, non-zero otherwise (3 for inactive). Use journalctl -u <unit> for the full log history.

03Risk

RiskMedium risk
RequirementsA Linux distribution using systemd

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

  • Ubuntu Manpage: systemctl - Control the systemd system and service manager
    manpages.ubuntu.com · technical · 2026-09-17
    Evidence: "status [PATTERN...|URL...] Show terse runtime status information about one or more units ... This function is intended to generate human-readable output ... along with the most recent log data."
  • systemctl(1) — Arch Linux manual
    man.archlinux.org · technical · 2026-09-17
    Evidence: "status [PATTERN...|URL...] — Show terse runtime status information about one or more units, followed by most recent log data from the journal."

Last verified: 2026-09-19 · Category: System & Settings

06Related solutions