Beginner Package: systemd

systemctl enable

Configure a service to start automatically at boot.

Syntax

systemctl enable|disable unit

Description

systemctl enable creates the symlinks needed for a unit to start automatically at boot; disable removes them. Neither command affects whether the service is running right now — pair with start/stop for that.

Examples

sudo systemctl enable nginx
Configure a service to start at boot
sudo systemctl disable nginx
Stop a service from starting at boot
sudo systemctl enable --now nginx
Enable at boot AND start it immediately

Applies to

Ubuntu Debian Linux Mint RHEL CentOS / Rocky / AlmaLinux Fedora Arch Linux openSUSE