LinuxCommandLibrary

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 -s SIGHUP --kill-whom main [unit]
copy
List available signals
$ systemctl kill -s help
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)
--user
Kill user service processes

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

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community