systemd

    Contents

  1. Power controls
  2. Service management
  3. Timers

systemd, system daemon, is the default init system for most Linux distributions. With the systemctl command you can manage backgroud services and troubleshoot problems.

Power controls #

Service management #

Service files are often in /etc/system/sytemd/service

systemctl start myservice
systemctl stop myservice
systemctl restart myservice

systemctl status myservice

To automatically start services when your system boots, you can use the enable and disable commands which will create symlinks to the service files:

systemctl enable myservice
systemctl enable myservice --now # start and enable
systemctl disable myservice

User services. #

Every user can also have services, for users the service files are located in .config/systemd these will always run as the user. You can use the same systemctl commands but with the --user flag.

Timers #

Timers are used to schedule services