1
User services
Anthony Wang edited this page 2023-02-02 06:46:47 +00:00
You can use systemd user services to manage daemons and other services.
Configuration
Run loginctl enable-linger $USER
, which makes systemd run your services even when you aren't logged in.
Usage
Create a service file in the folder ~/.config/systemd/user
with file extension .service
. Use this template for the service file:
[Unit]
Description=
[Service]
ExecStart=
[Install]
WantedBy=default.target
Now to manage your user service, you can use the same systemctl
commands you know and love, but with systemctl --user
instead of just systemctl
.