Forrest logo
tool overview
On this page you find all important commands for the CLI tool netstat. If the command you are looking for is missing please ask our AI.

netstat

The netstat command generates displays that show network status and protocol statistics. You can display the status of TCP and UDP endpoints in table format, routing table information, and interface information.

List of commands for netstat:

  • netstat:tldr:014a2 netstat: List information continuously.
    $ netstat --continuous
    try on your machine
    explain this command
  • netstat:tldr:02649 netstat: List all ports.
    $ netstat --all
    try on your machine
    explain this command
  • netstat:tldr:0b2f3 netstat: Display statistics by protocol.
    $ netstat -s
    try on your machine
    explain this command
  • netstat:tldr:4417b netstat: Display active TCP connections and express addresses and port numbers numerically.
    $ netstat -n
    try on your machine
    explain this command
  • netstat:tldr:4985b netstat: Display network adapter statistics, such as the number of bytes and packets sent and received.
    $ netstat -e
    try on your machine
    explain this command
  • netstat:tldr:57db5 netstat: Display all active TCP connections and the TCP and UDP ports on which the computer is listening.
    $ netstat -a
    try on your machine
    explain this command
  • netstat:tldr:6d49c netstat: Display PID and program names.
    $ netstat --program
    try on your machine
    explain this command
  • netstat:tldr:7ce08 netstat: Display a list of currently open ports and related IP addresses.
    $ netstat -an
    try on your machine
    explain this command
  • netstat:tldr:888ce netstat: List all listening ports.
    $ netstat --listening
    try on your machine
    explain this command
  • netstat:tldr:960c0 netstat: Display active TCP connections.
    $ netstat
    try on your machine
    explain this command
  • netstat:tldr:96c65 netstat: List listening TCP and UDP ports (+ user and process if you're root).
    $ netstat --listening --program --numeric --tcp --udp --extend
    try on your machine
    explain this command
  • netstat:tldr:9e738 netstat: List routes and do not resolve IP addresses to hostnames.
    $ netstat --route --numeric
    try on your machine
    explain this command
  • netstat:tldr:b3eb0 netstat: List listening TCP ports.
    $ netstat --tcp
    try on your machine
    explain this command
  • netstat:tldr:bacc1 netstat: Display active TCP connections and include the process ID (PID) for each connection.
    $ netstat -o
    try on your machine
    explain this command
  • netstat:tldr:c85b6 netstat: Display the contents of the IP routing table.
    $ netstat -r
    try on your machine
    explain this command
  • network:ports Show which tool is opening which port.
    $ netstat -tulpn
    try on your machine
    explain this command
tool overview