systemctl Basics

systemctl: start, stop, status and Reading a Failure

The daily verbs are start, stop, restart, reload, status and daemon-reload, which re-reads edited unit files. Prefer reload for Apache 129 and PHP-FPM, which finish requests in flight. The real skill is reading a failure: below, systemd-run creates a throwaway transient unit running PHP's built-in server on port 80, which Apache already holds.

Starting a server on a port Apache already holdsShell
sudo systemd-run --unit=port-clash /usr/bin/php -S 0.0.0.0:80
systemctl status port-clash --no-pager --lines=0
sudo journalctl -u port-clash -o cat --no-pager | tail -4
Output
Running as unit: port-clash.service; invocation ID: 1753c606067b4afb8130e7a74fddea05
× port-clash.service - [systemd-run] /usr/bin/php -S 0.0.0.0:80
...
     Active: failed (Result: exit-code) since Wed 2026-09-23 13:31:35 +08; 944ms ago
   Duration: 79ms
...
   Main PID: 1151 (code=exited, status=1/FAILURE)
...
Started port-clash.service - [systemd-run] /usr/bin/php -S 0.0.0.0:80.
[Wed Sep 23 13:31:35 2026] Failed to listen on 0.0.0.0:80 (reason: Address already in use)
port-clash.service: Main process exited, code=exited, status=1/FAILURE
port-clash.service: Failed with result 'exit-code'.

The symbol is the verdict: ● running, ○ inactive, × failed. Result is exit-code, signal or timeout, and Duration: 79ms means it died at once: configuration, not load. status= is the program's exit code, except that 203/EXEC, 200/CHDIR and 217/USER mean systemd 142,543 could not run the binary, enter WorkingDirectory= or switch to User=. The status says that it failed; the journal says why. A failed unit stays in systemctl --failed until it starts cleanly or you run systemctl reset-failed.