You can use the nmap command to find out which ports are listening for TCP connections from the network.
nmap -sT -O localhost
In this example, the -sT flag will scan for TCP ports and the -O flag will try to determine the operating system. Replace localhost with the host name of the machine you want to scan.