Common unit types:
service (daemons)socket (socket activation)timer (scheduling)mount / automountpath (watch filesystem paths)target (grouping / boot states)List unit files:
systemctl list-unit-files
systemctl list-unit-files --type=timer
Targets are like runlevels (modern).
systemctl get-default
systemctl list-units --type=target
Switch default target:
sudo systemctl set-default multi-user.target
sudo systemctl set-default graphical.target
Create an override:
sudo systemctl edit nginx
This writes a drop-in under:
/etc/systemd/system/nginx.service.d/override.conf
Apply changes:
sudo systemctl daemon-reload
sudo systemctl restart nginx
systemctl cat nginx
systemctl show -p FragmentPath nginx
systemctl list-dependencies nginx