Answers for "how to kill a process in a port in windows"

18

how to kill a process on a port?

#To list any process listening to the port 8080:
lsof -i:8080

#To kill any process listening to the port 8080:
kill $(lsof -t -i:8080)

#or more violently:
kill -9 $(lsof -t -i:8080)
Posted by: Guest on April-21-2020
3

kill a port in windows cmd

netstat -ano | findstr "PORT_NUMBER"

taskkill /PID <ID_HERE> /f 
//can be found on the last column next to LISTENING
____________________________________________________________________________
 TCP    0.0.0.0:3000           0.0.0.0:0              LISTENING       24660
____________________________________________________________________________

!!
taskkill /PID 24660 /f
Posted by: Guest on March-25-2021
0

kill process in windows using port number

Step 1
C:\> netstat -ano | findstr :YourPortNumber
Step 2
C:\> taskkill /PID enterPID /F
Posted by: Guest on June-30-2021

Code answers related to "how to kill a process in a port in windows"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language