开发者

how to kill 2 processes in linux

开发者 https://www.devze.com 2022-12-20 01:53 出处:网络
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

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

精彩评论

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