systemctl status
The command that shows a systemd unit's current state, main PID, recent resource use and last few log lines.
In more detail
It is the quickest local check that a service is up. Its exit status is 0 when the unit is active, so scripts can test it. Status tells you the current state; the journal explains the transitions and failures that led there.
Related terms
- active state — Whether a systemd unit is running right now, reported as active, inactive, failed, activating or deactivating.
- journalctl — The command that reads the systemd journal, where services on a Linux host write their logs.
- systemd — The program that starts and supervises background services on most Linux distributions.
Taught in
- Your Own Unit, And Reading journald — Linux Fundamentals & Systems Administration
- The Diagnostic Ladder: Is It Up, Is It Named, Is It Routed — Linux Fundamentals & Systems Administration