How to check Linux service status

When an application stops answering, systemd can show whether its daemon is running, failed, inactive, or waiting on another unit. Checking the service unit first keeps incident triage focused on the process state before network, firewall, or application-level tests take over.

Most modern Linux distributions manage background daemons as systemd units. systemctl status prints a human-readable unit summary with the loaded unit file, current active state, main process, and recent journal lines, while systemctl is-active returns a single state word for scripts and monitoring checks.

Use the exact unit name that the host uses, such as ssh.service, nginx.service, or a templated instance like worker@blue.service. Unprivileged users can usually read the active state, but sudo may be needed for the full status view when recent journal lines are restricted.

Steps to check Linux service status with systemctl:

  1. Confirm the service unit name.
    $ systemctl list-unit-files --type=service ssh.service
    UNIT FILE   STATE   PRESET
    ssh.service enabled enabled
    
    1 unit files listed.

    Replace ssh.service with the target unit. Use a quoted glob such as 'ssh*' only when the service name is uncertain.

  2. Check the service status summary and recent journal lines.
    $ sudo systemctl status --no-pager --lines=5 ssh.service
    ● ssh.service - OpenBSD Secure Shell server
         Loaded: loaded (/usr/lib/systemd/system/ssh.service; enabled; preset: enabled)
         Active: active (running) since Sat 2026-06-13 20:43:58 UTC; 46s ago
    TriggeredBy: ● ssh.socket
    ##### snipped #####
    Jun 13 20:43:58 host.example.net systemd[1]: Starting ssh.service - OpenBSD Secure Shell server...
    Jun 13 20:43:58 host.example.net sshd[71]: Server listening on 0.0.0.0 port 22.
    Jun 13 20:43:58 host.example.net sshd[71]: Server listening on :: port 22.
    Jun 13 20:43:58 host.example.net systemd[1]: Started ssh.service - OpenBSD Secure Shell server.

    --no-pager keeps the status output in the terminal or log. --lines=5 limits the journal section without using shell output filters.
    Related: How to manage a Linux service with systemctl
    Related: How to view Linux service logs with journalctl

  3. Return only the active state for a script or quick check.
    $ systemctl is-active ssh.service
    active

    For a single unit, active exits with status 0. Non-active states such as inactive, failed, or activating return a nonzero status.

  4. Check whether the service is enabled for future boots.
    $ systemctl is-enabled ssh.service
    enabled

    Enabled means systemd can start the unit through boot or dependency activation. It does not prove the service is running now.