nmap which is a port scanner and you can use netstat.
nmap can be used to scan your machine to see whats ports are open issue the
following command to scan your computers machine:
nmap -sS -O 127.0.0.1
The second method was netstat. netstat can show hidden ports and what programs using
them issue the following command as root: