kill 是 Linux 中用于向进程发送信号的命令。虽然名字是”kill”,但它不仅可以终止进程,还可以发送各种信号来控制进程行为。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
➜ kill --help kill: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec] Send a signal to a job. Send the processes identified by PID or JOBSPEC the signal named by SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then SIGTERM is assumed. Options: -s sig SIG is a signal name -n sig SIG is a signal number -l list signal names -L list signal names in a nice table format Exit Status: Returns success unless an invalid option is given or an error occurs.