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.
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
killall
? – zwets Jul 28 '21 at 23:33killall
, so added that there. Nor indeed does it mention @steeldriver's insight below. – zwets Jul 28 '21 at 23:40