Skip to main content

Networking

Find the process of service running/using port

Using lsof

lsof -i :22

Using ss

ss -ltnup 'sport = :22'

Using netstat

netstat -ltnup
  • l – show only listening sockets
  • t – show TCP connections
  • n – show addresses in a numerical form
  • u – show UDP connections
  • p – show process id/program name