Is is possible to programatically select process that is taking a specific port (:3000 for example) and kill it ?
I do that by hand now by using
netstat -tp
and then I would check pid of a process and kill it using kill
command.
I want to write a shell script that would do that automatically.
Copyright Notice:Content Author:「Kunok」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/41523255/kill-process-that-is-taking-specific-port