TL;DR: How to find which program is using a port, and stop it

KB ID 2610140006

The fix only. No explanation, no diagnosis. Read the full article if any of this does not match what you are seeing.

  1. Windows, elevated PowerShell, find the PID that owns the port:
Get-NetTCPConnection -LocalPort 80 -State Listen | Select-Object OwningProcess
Get-Process -Id <PID>
  1. Is it a service? Get-CimInstance Win32_Service -Filter "ProcessId=<PID>"
  2. Stop it: Stop-Service -Name <name>, or for a plain program Stop-Process -Id <PID> -Confirm.
  3. Linux: sudo ss -ltnp 'sport = :80', then systemctl status <PID>, then sudo systemctl stop <unit> or kill <PID>.
  4. Run the check again to confirm the port is free.

Do not kill PID 4, svchost.exe, lsass.exe or anything you cannot name. A shared svchost.exe hosts several services.

No process listed? Check netsh interface ipv4 show excludedportrange protocol=tcp and netsh http show servicestate.

← Full article, with the diagnosis and the why

Was this helpful?

Updated on October 14, 2026