How to Safely Kill Running Ports?
Window
Open command prompt and run below command to identify process id (PID) using specific port.
netstat -ano | find "3000"
After running this command you will see running PID. Now run below command, make sure you are updating <PID> with returned from above command
taskkill /F /PID <PID>
MAC/Linux
Open the terminal and run the following command to find the PID of the process using a specific port.
lsof -i :3000
sudo lsof -iTCP:3000 -sTCP:LISTEN
Once you have the PID, use the following command
kill -9 <PID>
All set process terminated now !!!
One Reply to “How to Safely Kill Running Ports?”