snippet
Find what is using a port
One command each for Linux, macOS and Windows.
This note is completely AI-generated. Check it before you rely on it.
Replace 8080 with the port you care about.
Linux
sudo ss -ltnp 'sport = :8080'
-l shows listening sockets, -t TCP, -n numeric ports, and -p the owning process.
macOS
sudo lsof -nP -iTCP:8080 -sTCP:LISTEN
Windows (PowerShell)
Get-NetTCPConnection -LocalPort 8080 -State Listen |
ForEach-Object { Get-Process -Id $_.OwningProcess }