Port kill in localhost - DH-Learning/MyWiki GitHub Wiki

  1. Open Command Prompt as Administrator.
  2. Run the following command:
    netstat -aon | findstr :<PORT>
    Replace with the port number you're checking.

If the port is in use, you’ll see output like:
TCP 127.0.0.1:8080 0.0.0.0:0 LISTENING 1234

  • 127.0.0.1:8080 – Port is bound to localhost

  • 1234 – PID (Process ID)

  1. To identify the process using that PID:
    tasklist /FI "PID eq 1234"

  2. Kill the Process
    taskkill /PID 1234 /F

  • Replace 1234 with your actual PID.

  • The /F flag forces termination.

⚠️ **GitHub.com Fallback** ⚠️