Using “ss”

“Socket statistics” (ss) is a netstat-like tool with slightly nicer formatting. Options:

For example, ss -tulpn will produce a nice list of open ports.