How to kill a currently using port on localhost in windows?

Step 1

Run command-line as an Administrator. Then run the below mention command. type your port number in yourPortNumber

netstat -ano | findstr :yourPortNumber

Red coloured circled area shows the PID (process identifier)

Step 2

Then you execute this command after identify the PID.

taskkill /PID typeyourPIDhere /F

P.S. Run the first command again to check if process is still available or not. You’ll get empty line if process is successfully ended.

Lascia un commento

Close Menu