List of opened sockets

In Linux or in Windows the command

netstat -a

displays the ports of communication which are opened.