Product SiteDocumentation Site

F.9.4. Killing and Masking services

systemctl kill sshd.service
systemctl kill -s USR1 daemon.service
With the first command, systemd kills all processes and child processes of the sshd service. The second command demonstrates how any Unix signal can be sent to the processes of a service.
systemctl mask sshd.service
Masking a service prevents the service from being started manually or automatically. For this example, systemctl is creating a symlink from /etc/systemd/system/sshd.service to /dev/null. Targets in /etc/systemd override those provided by packages in /lib/systemd. systemd recognizes the symlink and will not start the service.