Main directories

  • /lib/systemd/system/: Systemd files created by the system.
  • /usr/lib/systemd/system/: Systemd files distributed with Debian packages.
  • /run/systemd/system/: Systemd files created at runtime. They take preference over /usr/lib/systemd/system.
  • /etc/systemd/system/: Systemd files created by the system administrator. They take preference over /usr/lib/systemd/system.

Start a service

_$: service <name> start
_$: systemctl start <name>.service
_$: systemctl start <name>          # Default extension is '.service'

Enable service to start at boot

_$: systemctl enable <name>.service

Can be disabled:

_$: systemctl disable <name>.service

Reload a unit file after modifying it

_$: systemctl daemon-reload
_$: systemctl restart <name>.service