Hostxpeed
Login Get Started →
Security

How to Monitor Open Ports

4 min read
25 views
Jun 10, 2026

Method 1: Using netstat

sudo netstat -tulpn

Method 2: Using ss (Modern)

sudo ss -tulpn

Method 3: Using lsof

sudo lsof -i -P -n | grep LISTEN

Method 4: Using nmap (External Scan)

nmap -p- localhost

Continuous Monitoring with watch

watch -n 5 'ss -tulpn'

Was this article helpful?