Name
netstat
Synopsis
netstat [options]TCP/IP command. Show network status. Print information on active sockets, routing tables, interfaces, masquerade connections, or multicast memberships. By default, netstat lists open sockets.
Options
The first five options( -g, -i, -r, -s, and -M) determine what kind of information netstat should display.
- -g, --groups
Show multicast group memberships.
- -i, --interface[= name]
Show all network interfaces, or just the interface specified by name.
- -r, --route
Show kernel routing tables.
- -s, --statistics
Show statistics for each protocol.
- -M, --masquerade
Show masqueraded connections.
- -a, --all
Show all entries.
- -c, --continuous
Display information continuously, refreshing once every second.
- -e, --extend
Increase level of detail in reports. Use twice for maximum detail.
- -l, --listening
Show only listening sockets.
- -n, --numeric
Show network addresses, ports, and users as numbers.
- --numeric-hosts
Show host addresses as numbers, but resolve others.
- --numeric-ports
Show ports as numbers, but resolve others.
- --numeric-users
Show user ID numbers for users, but resolve others.
- -o, --timers
Include information on network timers.
- -p, --program
Show the process ID and name of the program owning the socket.
- --protocol= family
Show connections only for the specified address family. Accepted values are inet, unix, ipx, ax25, netrom, and ddp.
- -t, --tcp
Limit report to information on TCP sockets.
- -u, --udp
Limit report to information on UDP sockets.
- -v, --verbose ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access