Linux – Useful NetStat cmds

  1. Display Kernel IP Routing Table: netstat -rn
  2. Display Interface Rx/Tx Statistics: netstat -i
  3. Display Ethernet Interface Status & Errors: netstat -ie 
  4. Display All Protocol Statistics: netstat -s
  5. Display TCP Ststistics: netstat -st
  6. Display UDP Statistics: netstat -su
  7. Display PID of Service: netstat -tp
  8. Display Connections in Listening State: netstat -l  (-lt for TCP and -lu for UDP)
  9. Display Programs in a Listening State: netstat -ap
  10. Display Processes With PIDs and Usernames: sudo netstat -ltpe  (run as root)