check open ports code example
Example 1: check what ports are open linux
## if you use linux
sudo ss -tulw
Example 2: see what ports are in use
Get-Process -Id (Get-NetTCPConnection -LocalPort portNumber).OwningProcess
## if you use linux
sudo ss -tulw
Get-Process -Id (Get-NetTCPConnection -LocalPort portNumber).OwningProcess