27
How can I see which ports are open and listening on my server?
Loading...
Q&A · Answered
How can I see which ports are open and listening on my server?
Accepted answer
# Using netstat
sudo netstat -tlnp
# Using ss (modern)
sudo ss -tlnp
# Using nmap
nmap -sT -O localhost
# Check specific port
sudo lsof -i :80Say what you tried, not only what worked — the next person needs the reasoning. Code goes in a fenced block.