Linux Training : 8. netstat


netstat will print network connections, routing tables, interface statistics, masquerade connections, and multicast memberships. It is often a first tool in play for a network failure.

netstat uses

  • Some common uses

    • To show tcp connections
      • netstat --tcp
    • To show listening services on a host
      • netstat --tcp --listening --programs
    • To show current routing table
      • netstat --route
    • To list all open sockets and their SELinux context
      • netstat -x -Z
netstat exercise
  1. Find out your networking default route.
  2. How many open tcp connections are you currently running?