CommandLinux / Mac

Ethereal Bind

Find Process Using a Specific Port

Discovers which process is bound to a specific port. Essential for debugging "port already in use" errors or identifying rogue services.

lsof -i :8080
netstat -tlnp | grep :8080
ss -tlnp | grep :8080

Usage Notes

  • -i selects Internet addresses
  • Use sudo lsof to see all processes including those owned by other users
  • Kill the process: kill -9 PID
  • List all listening ports: lsof -i -P -n | grep LISTEN
  • On Windows, use netstat -ano | findstr :8080

Warnings

  • Warning:Be careful when killing processes - ensure you know what they do first

Related Scroll Ideas

  • • List all open network connections
  • • Find processes using specific files
  • • Monitor real-time port activity