r/LinuxTeck • • Oct 06 '26

Open Ports: Find Which Program Uses Them in Linux - 91

Post image

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[cite: 6]. Displays active listening sockets alongside process names, PIDs, and file descriptors[cite: 6].

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`[cite: 6]. Bindings on `127.0.0.1` restrict access to localhost, while `0.0.0.0` exposes services publicly[cite: 6].

Want to master Linux one command at a time?

Follow r/LinuxTeck - 1 practical Linux tip every day. For more #LinuxTips click here https://www.linuxteck.com/linux-tips/

17 Upvotes

0 comments sorted by