Code Snippet

Just another Code Snippet site

[Unix] Verifying Which Ports Are Listening

To determine which ports are listening for TCP connections from the network:

nmap -sT -O localhost

To check if a port is associated with the official list of known services :

cat /etc/services | grep 834

To check for port 834 using netstat, use the following command:

netstat -anp | grep 834

The lsof command reveals similar information to netstat since it is also capable of linking open ports to services

lsof -i : 834


One thought on “[Unix] Verifying Which Ports Are Listening

Leave a Reply to OLIVIER COMBE Cancel reply

Your email address will not be published. Required fields are marked *