2

From man kill:

kill -9 -1

      Kill all processes you can kill.

But when I do sudo /bin/kill -9 -1 nothing happens.

My uname -a for info:

Linux michal-Q530 3.16.0-45-generic #60~14.04.1-Ubuntu SMP Fri Jul 24 21:16:23 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

And I'm on Lubuntu.

UPDATE:

$ ps -e | wc -l
169
$ sudo /bin/kill -9 -1
$ ps -e | wc -l
169
  • My man page says kill -s signal .... Have you tried that? – ott-- Aug 4 '15 at 16:47
  • @ott-- still doesn't work. – MichalH Aug 4 '15 at 16:59
2

Finally solved by using this:

sudo /bin/kill -9 -- -1

If the first PID is negative, it has to be preceded by -- so it's not interpreted as an option.

So the real behavior of /bin/kill is distinct from the behavior described in the man page.

  • Ok, I missed that in the man page: kill [-s signal|-p] [--] pid... – ott-- Aug 4 '15 at 18:49
  • Does sudo kill -9 -1 work? – cuonglm Aug 4 '15 at 18:51
  • @cuonglm it doesn't work for me. I have tried it on both bash and dash. – MichalH Aug 4 '15 at 18:51
  • @Mike: sudo /bin/kill -9 -1 work for me on Fedora and CoreOS. – cuonglm Aug 4 '15 at 18:57
  • It seems to be a bug, what is your util-linux version? – cuonglm Aug 4 '15 at 19:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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