Score:0

How to kill multiple processes?

jp flag

Is there a way to kill multiple processes? e.g.

kill -9 49855 49856

I have tried using commands like pkill but they require a single pattern and do not allow multiple pid inputs.

zwets avatar
us flag
You may be looking for `killall`?
zwets avatar
us flag
Does this answer your question? [Killing several processes](https://askubuntu.com/questions/469089/killing-several-processes) In fact, it didn't mention `killall`, so added that there. Nor indeed does it mention @steeldriver's insight below.
Score:2
hr flag

The bash shell's builtin kill appears to accept only a single PID (or jobspec). However the external kill command (from package procps) accepts multiple pids:

$ sleep 60 & sleep 60 &
[1] 25208
[2] 25209

$ /bin/kill 25208 25209
[1]-  Terminated              sleep 60
[2]+  Terminated              sleep 60
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.