Quick Linux Tip #91:
Question: I see unexpected open ports. What program is behind each one?
Try: sudo ss -tulnp
Info: ss flags: -t=TCP, -u=UDP, -l=listening, -n=numeric, -p=processes. Displays active listening sockets alongside process names, PIDs, and file descriptors.
Examples:
- $
sudo ss -tulnp | grep :80# Filter for specific port bindings - $
sudo ss -tnp state established# Identify active inbound and outbound connections - $
sudo lsof -iTCP -sTCP:LISTEN -P -n# Alternative open port diagnostic using lsof
Note: Replaces legacy netstat -tulnp. Bindings on 127.0.0.1 restrict access to localhost, while 0.0.0.0 exposes services publicly.
Leave a Reply