netstat check port

Shell
sudo netstat -plnt

Source

Also in Shell: