Enable a service and start it immediately
start service at boot | enable autostart for a service | systemctl enable and start | service does not start after reboot | systemctl | enable | autostartCaution: This command changes the system. Understand what it does before you run it.
systemctl enable --now fail2banenable creates the links so the service starts at every boot, and --now additionally starts it right away. systemctl is-enabled and systemctl is-active with the unit name show whether it worked. Fixes the typical case where a service is no longer running after a reboot.
Also searched as
- start service at boot
- enable autostart for a service
- systemctl enable and start
- service does not start after reboot