Post

netstat

netstat

Command Overview

  • netstat -a
    • Displays all current connections and listening ports on the system.
  • netstat -t
    • Lists TCP connections.
  • netstat -u
    • Lists UDP connections.
  • netstat -at
    • Lists all TCP ports.
  • netstat -au
    • Lists all UDP ports.
  • netstat -r
    • Displays the routing table.
  • netstat -l
    • Displays listening ports.
  • netstat -lx
    • Lists Linux-specific listening ports.
  • netstat -lp
    • Displays all listening ports (both TCP and UDP) along with process IDs and program names.
  • netstat -s
    • Displays statistics by protocol.
  • **netstat -angrep ‘:[port number]’**
    • Finds a specific port number.
  • netstat -nao
    • Shows listening ports and active TCP connections.
  • netstat -naob
    • Displays process names instead of process IDs (requires Administrator privileges).

Source

This post is licensed under CC BY 4.0 by the author.