systemctl "Failed to start: Unit not found": find the service's real name
Fix systemctl "Failed to start X.service: Unit X.service not found": find the right service name, install the package, run daemon-reload, and check user units.
by OhSudo ·
Checked on real software: Ubuntu 24.04, systemd 255 · November 2026How we check
$ sudo systemctl start apache2Failed to start apache2.service: Unit apache2.service not found.systemctl status says the same thing in other words:
Unit apache2.service could not be found.systemd has no unit by that name. The service is most often installed under another name, and sometimes not installed at all, or its file was added without telling systemd.
TL;DR
# What's there with a similar name?systemctl list-unit-files | grep -i -E 'apache|httpd'
# A unit file you just added or changedsudo systemctl daemon-reload1. The name differs between distributions
The same software often has different service names on Debian/Ubuntu and on RHEL/Rocky/Fedora:
| Software | Debian / Ubuntu | RHEL / Rocky / Fedora |
|---|---|---|
| Apache | apache2 |
httpd |
| SSH server | ssh |
sshd |
| MySQL | mysql |
mysqld |
| MariaDB | mariadb |
mariadb |
| PostgreSQL | postgresql (and postgresql@16-main) |
postgresql (postgresql-16 from the PGDG repository) |
| Cron | cron |
crond |
| Firewall | ufw |
firewalld |
On Ubuntu and Debian, enabling apache2 also adds httpd as an alias, so systemctl start httpd works there once Apache is enabled, and fails before. Search for the name instead of guessing:
list-unit-files shows every unit that’s installed, whether it runs or not. systemctl list-units --all only lists the ones systemd has loaded.
2. The package isn’t installed
If nothing matches, the software isn’t there:
dpkg -l | grep -i apache # Debian / Ubunturpm -qa | grep -i httpd # RHEL familyInstall it (sudo apt install apache2, sudo dnf install httpd), and the unit comes with it. Some packages don’t ship a service at all, such as client-only packages like mysql-client or postgresql-client.
3. You wrote the unit file yourself
After creating or editing a file in /etc/systemd/system/, systemd doesn’t see it until you reload:
sudo systemctl daemon-reloadsudo systemctl start myappCheck the file’s name and place too: it must end in .service, sit in /etc/systemd/system/ (or /usr/lib/systemd/system/ for packages), and be readable. systemctl cat myapp shows the file systemd uses, and systemd-analyze verify /etc/systemd/system/myapp.service checks it. The systemd Unit Generator writes a working file to start from.
4. Other cases
- A user service: units in
~/.config/systemd/user/needsystemctl --user start myapp, withoutsudo. - A template:
name@.serviceruns as instances, such assystemctl start postgresql@16-main. - A typo:
systemctl start ngnixfails the same way. Tab completion aftersystemctl startlists the real names. - No systemd at all: in a container or WSL, the message is different: see System has not been booted with systemd.
You can practice finding the right name in the terminal, on Ubuntu or Rocky.
Shell, we have a problem!
Similar, but different: Job for X.service failed because the control process exited means the unit exists and failed to start. Failed to enable unit: Unit file X.service does not exist. is this error from systemctl enable. Unit X.service is masked. means it exists, and was blocked on purpose: find out why, then sudo systemctl unmask X. For everyday commands, see the systemctl and journalctl cheat sheet.
$ ./practice.sh
Practice this in the terminal
Open the Terminal Playground with this article’s scenario loaded. It is safe and runs in your browser.
Found this useful? Share it.
Found a mistake? Let us know at contact@ohsudo.com.