Reputation: 57
I've been trying to kill node process but always get error.
ps aux | grep node
root 21960 0.0 0.0 16976 972 pts/3 S+ 00:58 0:00 grep --color=auto node
when I tried to kill using -9 and even -2 I get this-bash: kill: (21960) - No such process
kill -9 21960
-bash: kill: (21960) - No such process
kill -2 21960
-bash: kill: (21960) - No such process
kill -9 16976
-bash: kill: (16976) - No such process
kill -2 16976
-bash: kill: (16976) - No such process
Upvotes: 1
Views: 3134
Reputation: 2169
You can tell the PID you are receiving is from the grep process by the returned value
grep --color=auto node
You can always use pidof to get your node pids
pidof node
Or you could just kill all of the node pids outright
pkill node
But based on the returned value of your ps aux, it doesn't look like a node process is running.
Upvotes: 1