开发者

how to kill 2 processes in linux

I have two programs running simultaneously ( in linux ) , with one running at the background. When i press ctrl+c , the prompt returns , but the processes seem to cont开发者_JAVA技巧inue.. How to kill them both ?


use pkill myprocess. If not, check the pid of the background process using ps -ef, then use kill -9 <pid>. you can also use pgrep myprocess to find those pids.


Background processes started from the same as your current shell are visible through job control as well. In bash type "jobs" and you can kill %1 for example.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜