LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

systemctl-kill

Send signals to unit processes

TLDR

Send SIGTERM to unit
$ systemctl kill [unit]
copy
Send specific signal
$ systemctl kill -s [SIGNAL] [unit]
copy
Send signal to main process only
$ systemctl kill --kill-whom=main -s SIGHUP [unit]
copy
Kill processes of a user service
$ systemctl --user kill [unit]
copy

SYNOPSIS

systemctl kill [OPTIONS] PATTERN...

DESCRIPTION

systemctl kill sends a signal to one or more processes of a unit. By default, it sends SIGTERM to all processes in the unit's cgroup. This provides more control than `systemctl stop`, which follows the unit's configured stop behavior.The `--kill-whom` option controls which processes receive the signal: main (the main process), control (control processes), or all (every process in the cgroup).

PARAMETERS

-s, --signal= SIGNAL

Signal to send (name or number, default: SIGTERM)
--kill-whom= WHO
Which processes to kill: main, control, or all (default: all). Older systemd versions use `--kill-who`.
--user
Kill user service processes

INSTALL

sudo apt install systemd
copy
sudo dnf install systemd
copy
sudo pacman -S systemd
copy
sudo zypper install systemd
copy
brew install systemd
copy
nix profile install nixpkgs#systemd
copy

CAVEATS

Bypasses the unit's configured ExecStop commands. Killing main process may leave child processes orphaned depending on unit configuration. SIGKILL cannot be caught or ignored by processes.

HISTORY

The kill subcommand provides direct signal delivery to unit processes, useful when the normal stop procedure is insufficient or when specific signals are needed (like SIGHUP for config reload).

SEE ALSO

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid