1. 查找出系统运行的进程中包含nginx关键字的进程 ps -ef | grep nginx | grep -v grep
ps -ef | grep nginx | grep -v grep
2. 后面加上|sh后,则执行这条命令,杀掉这些进程 ps -ef | grep nginx | grep -v grep | awk '{print "kill -9 "$2}' | sh
ps -ef | grep nginx | grep -v grep | awk '{print "kill -9 "$2}' | sh