Skip to content

Q&A · Answered

How to check open ports on Linux

asked 9 months, 1 week ago 651 views 1 answer
27

How can I see which ports are open and listening on my server?

1 Answer

One accepted
29

Accepted answer

Not confirmed since it was written, 9 months, 1 week ago
# Using netstat
sudo netstat -tlnp

# Using ss (modern)
sudo ss -tlnp

# Using nmap
nmap -sT -O localhost

# Check specific port
sudo lsof -i :80

Your answer

Say what you tried, not only what worked — the next person needs the reasoning. Code goes in a fenced block.

Shown beside your answer and never checked, so it cannot be a name someone already has here.

No account needed to answer. Sign in instead and it carries your name and earns reputation.