Ubuntu killall 命令详解

"killall" 用于按名称杀死指定进程 (kill processes by name)。

以前,若要找到杀死进程,需使用 "ps" 命令配合 "grep" 查找进程,而 "killall" 却把这 2 个过程合二为一了。

譬如:killall memcached


killall [OPTION]... [--] NAME...

killall -l, --list

killall -V, --version

Option 参数

# 参数 EN 解释 中文翻译 备注
01 -e,--exact require exact match for very long names
02 -I,--ignore-case case insensitive process name match
03 -g,--process-group kill process group instead of process
04 -y,--younger-than kill processes younger than TIME
05 -o,--older-than kill processes older than TIME
06 -i,--interactive ask for confirmation before killing
07 -l,--list list all known signal names
08 -q,--quiet don't print complaints
09 -r,--regexp interpret NAME as an extended regular expression
10 -s,--signal SIGNAL send this signal instead of SIGTERM
11 -u,--user USER kill only process(es) running as USER
12 -v,--verbose report if the signal was successfully sent
13 -V,--version display version information
14 -w,--wait wait for processes to die


功能 # 命令规范 文字解释 示例 示例解释
杀死进程 01 killall <command-name> 杀死指定名称进程 killall memcached 杀死 memcached 进程
查看帮助 01 killall --help 查看 killall 帮助信息
查看版本 01 killall --version 查看 killall 版本信息