Home

netstat

Netstat is a command-line networking utility that reports on current network connections, routing tables, and various network interface statistics. It is available on most Unix-like systems and Windows and is commonly used by system administrators and developers to diagnose connectivity problems, monitor network activity, and verify service bindings. The name stands for network statistics.

Core capabilities include displaying active TCP and UDP connections, listening ports, and the routing table. Typical

Originating in early Unix as part of the net-tools suite, netstat has long been a standard tool

In practical use, netstat helps verify which services are listening on which ports, identify established versus

options
vary
by
platform
but
common
ones
include
-a
to
show
all
connections
and
listening
ports,
-t
and
-u
to
limit
output
to
TCP
or
UDP,
-l
to
show
only
listening
sockets,
-n
to
present
numeric
addresses
and
ports,
-p
to
show
the
associated
process
ID
and
program
name,
-r
to
print
the
routing
table,
-i
for
interface
statistics,
and
-s
for
per-protocol
statistics.
Some
implementations
require
elevated
privileges
to
reveal
program
names
or
to
access
certain
sockets.
for
network
inspection.
On
many
Linux
distributions
its
functionality
has
been
superseded
in
practice
by
the
iproute2
tools
and
the
ss
utility,
while
netstat
remains
available
for
compatibility.
Windows
also
includes
netstat
as
a
built-in
command
and
it
supports
similar
options
with
its
own
syntax.
waiting
connections,
and
inspect
routing
decisions.
For
instance,
netstat
-tuln
shows
listening
TCP/UDP
ports
with
numeric
addresses
on
Linux,
while
netstat
-p
shows
the
owning
process.
For
modern
Linux
environments,
ss
is
often
recommended
as
a
faster
alternative,
with
netstat
retained
mainly
for
compatibility.