Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I need to kill a few Python processes. I can get a list of the process numbers using pgrep python, but how can I kill them all at once instead of killing one by one?

I'm looking for something like:

pgrep python | kill process_nos
share|improve this question
1  
man killall... –  Alex P. Apr 16 at 23:57

2 Answers 2

up vote 2 down vote accepted

You can try:

pgrep python | xargs kill
share|improve this answer
1  
Why would you invoke THREE processes when one suffices? –  tink Apr 17 at 9:23
pkill python

Short and sweet, man pkill for details.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.