LinuxJunior

A systemd service failed to start

When a systemd unit fails, systemctl status shows the state and the last log lines. Read the journal for that unit, fix it, then reset the failed state.

What you see

  • systemctl status NAME shows failed
  • The service starts and then stops again

What it means

systemd keeps a state for every unit. A unit in the failed state tried to run and did not succeed. The exit reason and the program's own output are in the journal.

How to confirm the cause

  1. 1
    See the state and the last log lines
    systemctl status NAME

    Read the Active: line and the log lines under it.

  2. 2
    Read the unit's logs from this boot
    journalctl -u NAME -b

    -u filters by unit and -b limits to the current boot. Add -p err to show errors only.

  3. 3
    List everything that failed
    systemctl --failed

    Lists units in the failed state.

  4. 4
    Script-friendly check
    systemctl is-failed NAME

    Returns success if the unit is in the failed state.

Causes and fixes

  • Bad command, path or permissions in the unit

    HOW TO TELL
    The status output shows the process exiting immediately, or a message about the executable.
    FIX
    Correct ExecStart= and the user or permissions it runs under. After editing a unit file, reload systemd and start it again.
    sudo systemctl daemon-reload
    sudo systemctl start NAME
  • The application itself crashed

    HOW TO TELL
    The journal for the unit shows the application's own error.
    FIX
    Fix what the application reports, such as a missing config file or a port already in use.
  • A dependency is not running

    HOW TO TELL
    The unit refuses to start because another unit it needs failed.
    FIX
    Run systemctl status on the dependency and fix it first.

How to stop it coming back

  • Test a new unit with systemctl status and journalctl -u right after you create it.
  • Keep one fix per change so the cause stays clear.

Keep going

Sources

Linux man-pages (man7.org) and the systemd manual (freedesktop.org), read 18 Nov 2026. Command options were checked against those pages.

Search

Search cheat sheets and projects