How to Find and Kill Process Using Port on Windows
Identify which process is using a port and terminate it quickly using netstat and taskkill.
Before you start
Step-by-step instructions
1. Find process using a port
Use netstat to find which process is using the port.
netstat -ano | findstr :8080
Replace 8080 with your target port number.
2. Identify PID
The last column in the output is the PID (Process ID).
TCP 0.0.0.0:8080 ... LISTENING 1234
3. Kill the process
Use taskkill to terminate the process.
taskkill /PID 1234 /F
Forcefully terminates the process using the specified PID.
Common issues
Run Command Prompt as Administrator.
Another process may restart automatically (e.g., service).
Double-check PID before executing taskkill.