How to kill a running process ?
It looks like you can use the
pidof command to identify the process id and then the
kill command to stop it. I had an Express (Node.js) server that I couldn't kill and in the console I kept seeing the error EADDRINUSE (the port was already in use) due to Repl.it running my code automatically.
pidof node and then
kill <pid> worked for me. Note that in my case there were multiple pids for node so I used the piped commands below to kill all node processes
You won't be able to kill the process from the shell. The two easiest ways to do it are:-
1. Wait for 1 hour for it to kill itself.
2. Write 1 or 2 words deliberately to make the code buggy, then restart.