netstat

Linux · Network · available in the simulator

What it does

Displays network connections, listening ports, and routing tables.

Syntax

netstat [opciones]

Options and parameters

  • -t

    Displays TCP connections.

  • -u

    Displays UDP connections.

  • -l

    Displays listening ports only.

    netstat -tuln
  • -n

    Displays numerical addresses and ports without resolving names.

  • -p

    Displays the process owning each connection; requires privileges.

  • -r

    Displays the routing table.

Usage examples

  • netstat -tuln

Notes and common mistakes

  • Deprecated on many distributions; the modern alternative is ss.
Practise netstat

Related commands