User:Tsu2/systemd commands
Synopsis
This page is a brief reference and compilation of useful systemd commands
Basic to the information on this page is that the systemd Unit file is itself a configuration file which references executables, configuration files, settings and more.
Convention
The "pipe" character | signifies a multiple selection of arguments, choose only one
The Commands
Start Stop Restart
Basic app or service activation
systemctl start|stop|restart Unitname
Run as a Service on Boot
All systemd Unit files can start on boot (aka service) or not
systemctl enable|disable Unitname.service
Reload
Whenever a configuration has been changed, the service or system must be reloaded
The Following re-reads the configuration for a service and restarts. My personal experience is that there is no certainty the new configuration will be active.
systemctl reload Unitname.service
The Following stops a specific app or service, re-reads the configuration and restarts which pretty much ensures the new configuration will be active
systemctl force-reload Unitname.service
Although some documentation might say that the following stops systemd, re-reads the systemd configuration and reloads, it's my experience that the following also re-reads every configuration for all services before restarting all.
systemctl daemon-reload