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
2
  • My man page says kill -s signal .... Have you tried that?
    – ott--
    Commented Aug 4, 2015 at 16:47
  • @ott-- still doesn't work.
    – MichalH
    Commented Aug 4, 2015 at 16:59

1 Answer 1

3

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.

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .