HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

systemctl kill — Send a signal to one or more processes of a unit. More information: <https://www.freedesktop.org/sof

Submitted by: @import:tldr-pages··
0
Viewed 0 times
commandsendsystemctl killclisignalmoreprocessesone
linux

Problem

How to use the systemctl kill command: Send a signal to one or more processes of a unit. More information: <https://www.freedesktop.org/software/systemd/man/latest/systemctl.html#kill%20PATTERN%E2%80%A6>.

Solution

systemctl kill — Send a signal to one or more processes of a unit. More information: <https://www.freedesktop.org/software/systemd/man/latest/systemctl.html#kill%20PATTERN%E2%80%A6>.

Send the SIGTERM signal to a unit to terminate it:
systemctl kill {{unit}}


Send a specific signal to a unit:
systemctl kill {{[-s|--signal]}} {{signal_number|signal_name}} {{unit}}


Send a SIGHUP signal to only the main process of a unit:
systemctl kill {{[-s|--signal]}} SIGHUP --kill-whom main {{unit}}


List all available signals:
systemctl kill {{[-s|--signal]}} help

Code Snippets

Send the `SIGTERM` signal to a unit to terminate it

systemctl kill {{unit}}

Send a specific signal to a unit

systemctl kill {{[-s|--signal]}} {{signal_number|signal_name}} {{unit}}

Send a `SIGHUP` signal to only the main process of a unit

systemctl kill {{[-s|--signal]}} SIGHUP --kill-whom main {{unit}}

List all available signals

systemctl kill {{[-s|--signal]}} help

Context

tldr-pages: linux/systemctl kill

Revisions (0)

No revisions yet.