Sometimes your doing some testing, your computer goes to sleep or whatever, you lose your SSH window.
Node keeps running happily in the background, but you can’t start it again because its still holding on to the port.
We need to kill the node process. This as simple as running the command to list all running processing, and ‘grepping’ the result to only include node, think of grep as a simple find in.
ps aux | grep node
That’ll list all your node processes. You can then type kill and the id number, which comes just after the user running node in the second column. Your actual search for node will show up in the process list too! So if you look at the right most column you’ll see grep node, which is your search. You can’t actually kill that because its already finished, so a kill and the id number will just produce a no such process and cause no harm.