NETSTA
NETSTA
[edit]
On Unix-like systems:
To continuously display open TCP and UDP connections numerically and also which
program is using them on Linux:
netstat -nutpacw
Windows
[edit]
On Microsoft Windows:
To display active TCP connections and the process IDs every 5 seconds, type the
following command (works on NT based systems only, or Windows 2000 with hotfix):
netstat -o 5
To display active TCP connections and the process IDs using numerical form, type the
following command (works on NT based systems only, or Windows 2000 with hotfix):
netstat -no
*nix
[edit]
Command Explanation
Shows all sockets, both listening and non-listening, all protocols like
netstat -a
TCP, UDP etc.
netstat -at Shows only TCP connections (-au shows only UDP connections)
netstat -r Shows kernel routing information. This is the same output as route -e.
netstat -g Display multicast group membership information for IPv4 and IPv6.
Display all services listening for TCP and UDP, all free open ports on
netstat -lntu
the local machine.
netstat -atnp |
grep ESTA
Displays all currently "established" TCP connections.
Wildcards
[edit]
Example output:
Unix-like
[edit]
On Unix-like systems:
To continuously display open TCP and UDP connections numerically and also which
program is using them on Linux:
netstat -nutpacw
Windows
[edit]
On Microsoft Windows:
To display active TCP connections and the process IDs every 5 seconds, type the
following command (works on NT based systems only, or Windows 2000 with hotfix):
netstat -o 5
To display active TCP connections and the process IDs using numerical form, type the
following command (works on NT based systems only, or Windows 2000 with hotfix):
netstat -no
*nix
[edit]
Command Explanation
Shows all sockets, both listening and non-listening, all protocols like
netstat -a
TCP, UDP etc.
netstat -at Shows only TCP connections (-au shows only UDP connections)
Also show PID and to which program each socket belongs, e adds extra
netstat -aep
info like the user. Run as root to see all PIDs.
netstat -r Shows kernel routing information. This is the same output as route -e.
Displays a table of all network interfaces. Add -e to get output similar to
netstat -i
ifconfig.
netstat -g Display multicast group membership information for IPv4 and IPv6.
Display all services listening for TCP and UDP, all free open ports on
netstat -lntu
the local machine.
netstat -atnp |
grep ESTA
Displays all currently "established" TCP connections.
Wildcards
[edit]
Example output: