A systemd unit fails to start
The exit status in the systemctl output tells you which class of failure it was, and that narrows the cause immediately.
What you see
systemctl start reports the job failed and suggests checking journalctl. The service either never starts or restarts in a loop.
What is actually wrong
Depends on the status code: 203/EXEC means the binary is not there or is not executable, 200/CHDIR means WorkingDirectory does not exist, 226/NAMESPACE means a sandboxing directive cannot be satisfied, 1/FAILURE means the program itself exited with an error.
Codes and articles
Fixes (3)
Read what the unit actually said
Always start here. The status line is a summary; the journal has the program's own error.
Read the full status including the last log lines.
systemctl status myservice.service -l --no-pagerRead this boot's journal for the unit, with explanations.
journalctl -u myservice.service -b --no-pager -x-b limits it to the current boot, which cuts out weeks of previous failures that make the real error hard to find.
If the service dies instantly, follow it live in another terminal while you start it.
journalctl -u myservice.service -fCheck the unit file for a syntax problem or a stale override.
systemd-analyze verify myservice.servicesystemctl cat myservice.service
systemctl cat shows the unit plus every drop-in override applied to it — an override in /etc/systemd/system/myservice.service.d/ is easy to forget and silently wins.
After editing any unit file, reload the manager before trying again.
sudo systemctl daemon-reloadsudo systemctl restart myservice.service
systemctl is-active myservice.serviceFix status=203/EXEC
The status is 203/EXEC. systemd could not execute the command at all.
Read the exact ExecStart line.
systemctl cat myservice.service | grep ExecStartCheck the binary exists and is executable.
ls -l /usr/local/bin/myappfile /usr/local/bin/myapp
The three usual causes are: the path is wrong, the file is not chmod +x, or it is a script whose shebang points at an interpreter that is not installed.
ExecStart must be an absolute path — systemd does not use $PATH.
which myappIf it is a script, check the shebang and that the interpreter exists.
head -1 /usr/local/bin/myappCheck for CRLF line endings if the script came from Windows — the shebang becomes invalid and the error looks identical.
file /usr/local/bin/myapp | grep -q CRLF && sudo sed -i 's/\r$//' /usr/local/bin/myappMake it executable if it is not.
sudo chmod +x /usr/local/bin/myappsudo systemctl daemon-reload && sudo systemctl start myservice
systemctl is-active myservice.serviceFix a sandboxing or working directory failure
Status 226/NAMESPACE or 200/CHDIR.
Find the directive at fault.
systemctl cat myservice.service | grep -E 'WorkingDirectory|ReadWritePaths|ProtectSystem|ProtectHome|PrivateTmp|StateDirectory'For 200/CHDIR, create the directory or correct the path.
sudo mkdir -p /var/lib/myapp && sudo chown myapp:myapp /var/lib/myappFor 226/NAMESPACE, the usual cause is ReadWritePaths naming a path that does not exist.
systemctl show myservice.service -p ReadWritePathssystemd refuses to build the mount namespace if a listed path is missing, and the resulting error says nothing about which one.
Prefer StateDirectory= over hand-made directories — systemd creates it with the right ownership automatically.
sudo systemctl edit myservice.serviceReload and retry.
sudo systemctl daemon-reload && sudo systemctl start myservice
systemd-analyze security myservice.serviceWhere this stops. This write-up was written and checked by hand. It says what each step changes, how to confirm it worked and how to reverse it, and anything destructive is flagged before you reach it. If it does not match what your machine is doing, search the Support Centre for the exact code or message — and when something needs a person, get in touch.