What is the difference between starting a service and enabling it at boot?
Starting a service affects its current runtime state. Enabling a service creates the activation links described by its unit installation rules, usually for a future boot or target activation. A service may also start through sockets, timers or dependencies, so disabled does not always mean it can never run.
Before you start
- An authorised SSH session on the Linux server.
Instructions
1. Inspect both current and boot-related state
Use the exact application unit. The two commands answer different questions and may legitimately return different results.
systemctl is-active example.service
systemctl is-enabled example.serviceFor example, a service can be active now but disabled for normal boot activation. Static and indirect are also meaningful states.
2. Enable only the intended service
After confirming its configured dependencies and application readiness, enable the unit if boot activation is required. This example does not request an immediate start.
sudo systemctl enable example.service
systemctl is-enabled example.serviceDo not add --now unless starting the service immediately is also intended and authorised.
Check the result
- The configured activation state matches the operating plan. Verify the application after the next planned reboot; enablement alone does not prove boot-time success.
Troubleshooting
- The unit is static
- It has no ordinary enablement instructions and may be started by another unit. Review its intended activation model.
- A disabled service starts again
- Check socket, timer and dependency activation before assuming systemd ignored the setting.
Official references
Use the documentation for your installed version when a flag, service name or platform feature differs.
