The killall
command uses the process name to kill a process, and can kill a group of processes with the same name. In the previous section, we introduced the command kill
, which kills the process by the process number. If you want to find the process number, you need to use commands such as ps
and grep
to find it, and killall
simplifies this process.
Syntax format: killall [parameter]
Common parameters:
Example
# 强制杀死所有的nginx 进程killall -9 nginx
This article is reprinted from https://xugaoxiang.com/2022/06/15/linux-cmds-53-killall/
This site is for inclusion only, and the copyright belongs to the original author.