- List listening ports and the programs behind themNeeds sudo
sudo lsof -iTCP -sTCP:LISTEN -n -P
- List listening ports and the programs behind themNeeds sudo
sudo ss -tulpn
- List listening ports and the programs behind them
Get-NetTCPConnection -State Listen | Sort-Object LocalPort | Select-Object LocalAddress, LocalPort, @{n='Program';e={(Get-Process -Id $_.OwningProcess).ProcessName}}