lsof -Pnl +M -i4 lsof -Pnl +M -i6 or netstat -tulpn netstat -npl
There are obviously a number of ways to accomplish this, but these variations will cover a lot of ground. You can also combine this with grep to filter out things you don’t need to see, or to only include specific processes and/or ports.
See post from @geek1968 on Instagram