sudo netstat -tulpen
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State User Inode PID/Program name
tcp 0 0 0.0.0.0:2628 0.0.0.0:* LISTEN 112 14175 5380/0
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 0 12608 4549/portmap
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 0 30291 5363/cupsd
tcp6 0 0 :::22 :::* LISTEN 0 129131 14990/sshd
udp 0 0 0.0.0.0:34574 0.0.0.0:* 109 13810 5322/avahi-daemon:
udp 0 0 0.0.0.0:5353 0.0.0.0:* 109 13809 5322/avahi-daemon:
udp 0 0 0.0.0.0:111 0.0.0.0:* 0 12603 4549/portmap
udp 0 0 0.0.0.0:34418 0.0.0.0:* 0 13941 5430/inetd