通过进程号杀应用程序通常有一下三种方法:
1、ps aux | grep apache | awk '{print $2}' | xargs kill -9 # 列出 PID 并杀掉 Process
2、ps -C apache2 -o pid=|xargs kill -9 # 列出 PID 并杀掉 Process(-C后面必须是应用程序完整名称)
3、kill `pidof firefox`
另外可以通过应用程序名杀:
killall firefox
阅读(1726) | 评论(0) | 转发(0) |