Networking & Firewall (Ss/Netstat/Iptables/Nftables/Curl)
Identifying Socket Ownership by Process UID
🧩 The Challenge
It is difficult to determine which specific system user owns a listening network service when multiple processes are running on a busy server.
💡 The Fix
Use the socket statistics utility to filter and display the numeric user ID associated with each active network connection.
ss -nutp -o state listening
⚙️ Why It Works
The -n flag prevents slow DNS resolution while the -p flag forces the tool to show the process owner and PID, allowing for immediate identification of the user responsible for a socket.
🚀 Pro-Tip: Use ss -lntu ‘( sport = :80 )’ to isolate connections for a specific port instantly.
Linux Tips & Tricks | © ngelinux.com | 7/11/2026
