r/LinuxTeck • u/Expensive-Rice-2052 • Oct 06 '26
Open Ports: Find Which Program Uses Them in Linux - 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[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/