Systemd User Setup

by Scott, Revised on September 3, 2017 (LinuxWeb DevelopmentWeb Serving)

Create a user systemd directory:

mkdir ~/.config/systemd
mkdir ~/.config/systemd/user

Create a service file (reload after every edit update):

cd ~/.config/systemd/user
nano whatever.service
systemctl --user daemon-reload

Usage:

systemctl --user start whatever
systemctl --user stop whatever

Enable (or disable) upon boot:

systemctl --user enable whatever
systemctl --user disable whatever

Without a constant login session, enable linger status and verify:

loginctl enable-linger username
loginctl user-status username

Tags: LinuxWeb DevelopmentWeb Serving