jps | grep "Main" | awk '{print $1}' | xargs kill 将其中的 Main 替换为需要kill的进程名即可。 转载于:https://www.cnblogs.com/ksguai/p/5772809.html