How to find listening ports

Use netstat or ss

netstat -lntup
ss -lntup