lsof -i | grep LISTEN | grep "TCP \*:" | sort
Or to find out what processes have open connections use
lsof -i | grep ESTABLISHED | sort
Nothing ground breaking, but useful. netstat gives you similar info, but doesn’t include the process.
lsof -i | grep LISTEN | grep "TCP \*:" | sort
Or to find out what processes have open connections use
lsof -i | grep ESTABLISHED | sort
Nothing ground breaking, but useful. netstat gives you similar info, but doesn’t include the process.