Enable systemd services
Enable your containerized services to start automatically at boot. For user services, you must enable lingering to help ensure they persist after logout.
Procedure
- To enable a service at system start, no matter if user is logged in or not, enter:
# systemctl enable <service>You have to copy the
systemdunit files to the/etc/systemd/systemdirectory. - To start a service at user login and stop it at user logout, enter:
$ systemctl --user enable <service>You have to copy the
systemdunit files to the$HOME/.config/systemd/userdirectory. - To enable users to start a service at system start and persist over logouts, enter:
# loginctl enable-linger <username>Refer to
systemctl(1)andloginctl(1)man pages on your system for more information.