How to kill process of already use port in Windows OS

When managing network connections in Windows, you may need to identify which process is using a specific port. This can be done by listing the owning process IDs associated with each connection.

List All Listening Ports with Process IDs

netstat -ao | find /i “listening”

Terminate a Process by ID

If you want to free up a port, you can terminate the process using its ID:

Taskkill /F /PID [process-id]

Find a Specific Port

To check which process is using a particular port, run:

netstat -aon | findstr [port-number]

Note: Always ensure you are terminating the correct process, as killing system‑critical tasks may affect stability.

Leave a Comment