返回命令列表

Linux command

systemctl-kill 命令

文本

Copy it and replace filenames, paths, or keywords as needed.

命令示例

Example

systemctl kill [unit]

Example

systemctl kill -s [SIGNAL] [unit]

Example

systemctl kill --kill-whom=main -s SIGHUP [unit]

Example

systemctl --user kill [unit]

说明

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).

参数

-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

FAQ

What is the systemctl-kill command used for?

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).

How do I run a basic systemctl-kill example?

Run `systemctl kill [unit]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -s, --signal= _SIGNAL_ do in systemctl-kill?

Signal to send (name or number, default: SIGTERM)