pi@raspberrypi:~ $ sudo netstat -tulpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:34497 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:2049 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:5355 0.0.0.0:* LISTEN 335/systemd-resolve
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1/init
tcp 0 0 0.0.0.0:54003 0.0.0.0:* LISTEN 864/rpc.mountd
tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN 335/systemd-resolve
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 862/sshd
tcp 0 0 0.0.0.0:58395 0.0.0.0:* LISTEN 864/rpc.mountd
tcp 0 0 127.0.0.1:2812 0.0.0.0:* LISTEN 946/monit
tcp 0 0 0.0.0.0:41565 0.0.0.0:* LISTEN 864/rpc.mountd
tcp6 0 0 :::2049 :::* LISTEN -
tcp6 0 0 :::50695 :::* LISTEN 864/rpc.mountd
tcp6 0 0 :::5355 :::* LISTEN 335/systemd-resolve
tcp6 0 0 :::35757 :::* LISTEN 864/rpc.mountd
tcp6 0 0 :::42863 :::* LISTEN -
tcp6 0 0 :::111 :::* LISTEN 1/init
tcp6 0 0 :::21 :::* LISTEN 959/proftpd: (accep
tcp6 0 0 :::22 :::* LISTEN 862/sshd
tcp6 0 0 :::56025 :::* LISTEN 864/rpc.mountd
tcp6 0 0 ::1:2812 :::* LISTEN 946/monit