Try to kill all the nodes but did not work on osx

I hope to restart nodejs on mac osx

$ps aux | grep node mymac 20215 0.0 0.0 2432768 460 s000 R+ 9:49AM 0:00.00 grep node 

there is one PID 20215, I'm trying to kill a process

 kill -2 20215 

he reports

 -bash: kill: (20215) - No such process 

your comment is welcome

+11
source share
1 answer

There is no other process containing the keyword "node" in your ps aux output except from grep node . You are trying to kill the grep process of the nodes, and none of the nodes are working, therefore it is not working.

Try with

 sudo killall node 

Or

 sudo kill -9 'ps aux | grep node | grep -v grep | awk '{print $2}'' 
+34
source

Source: https://habr.com/ru/post/958035/


All Articles