-1

I used to use the following command line code to kill all processes

kill `ps -ef| grep -i selenium | grep -v grep| awk '{print $2}'`

but that does not work in ubuntu16

can someone pls help?

Chris Hansen
  • 139
  • 1
  • 1
  • 4

2 Answers2

1

From kill man page:

If no signal is specified, the TERM signal is sent. The TERM signal will kill processes which do not catch this signal. For other processes, it may be necessary to use the KILL (9) signal, since this signal cannot be caught.

In other words, if a process register for catch a KILL signal but it never respond to it (is: by being stuck) it will not be killed.

To force close an unresponsive process you can use the kill -9 command, which instruct the operating system to immediately kill the target process.

shodanshok
  • 44,038
  • 6
  • 98
  • 162
-1

alternatives:

  • pkill,
  • killall

or killall -9 if you are not afraid of zombie

sebix
  • 4,175
  • 2
  • 25
  • 45