Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm on Debian GNU/Linux. The man page for "kill" says I can use negative PID value to kill process group, but when running on command line, it does not work:

$ /bin/kill -9 -21581
/bin/kill: invalid option -- '2'

 kill [options] <pid> [...]

When using the bash built-in kill, it works fine.

share|improve this question
up vote 8 down vote accepted

Because its the first PID, you need to preceed it with "--" otherwise it'll be mistook for an option.

kill -9 -- -21581
share|improve this answer
Is this documented anywhere? – mehturt May 17 '12 at 14:46
Sorry. I found it documented on RHEL, but not on Debian. – mehturt May 17 '12 at 14:54
@mehturt This is documented in the 'Common Options' chapter of the gnu coreutils doc [… – Dana the Sane Nov 13 '12 at 17:03

Your Answer


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.