Stop blindly guessing why your local socket connections are hanging
Networking & Firewall (Ss/Netstat/Iptables/Nftables/Curl)
Stop blindly guessing why your local socket connections are hanging
🧩 The Challenge
Dealing with a service that refuses to bind to a port because the OS claims it’s already in use is a special kind of hell. You check your logs, kill the process, and it still won’t start.
💡 The Fix
Use the socket statistics utility to filter for specific states and processes so you can actually see what’s lingering in the background. It cuts through the noise of hundreds of established connections in seconds.
ss -lptn 'sport = :8080'
⚙️ Why It Works
This command forces the socket monitor to only show you listening processes bound to that exact port number. Because it pulls directly from the kernel’s state table, it bypasses the guessing game of which PID is holding onto the descriptor.
🚀 Pro-Tip: Pipe that output into grep if you’re hunting for a specific service name that isn’t showing up clearly.
Linux Tips & Tricks | © ngelinux.com | 9/23/2026
