- Sep 3, 2023
- 55
How to use netstat on Windows or Linux in Command Terminals.
Open either Windows command with elevated privileges "Run As Admin" or the Linux terminal in su "switch user" and type "netstat" and hit enter.
To help you understand what you are viewing if new to this, is a brief list of explanations.
Proto: The network Protocol. It will either be TCP or UDP.
Local Address: The IP addresses and ports of your computers network interfaces for the given connections.
Foreign Address: The IP addresses and port names of the remote devices.
State: Indicates the state of the connection. Whether its active or closed ect.
Additional commands to help specify details in a targeted manor.
netstat -n
Used to view connection's port numbers instead of port names next to an IP address.
netstat -n 5
Since the system can and does disconnect and connect to networks, the details will change at intervals. This command is used to refresh netstat at intervals. The 5 in the command can be changed to another number to lengthen or shorten intervals.
"Keep in mind when you start a process as such "Control C" will stop that process in a terminal on both Windows and Linux.
netstat -a
Will display all connections that are active or inactive.
netstat -b
Will show statistics of incoming and out going packets.
netstat -e
Will show you fully qualified domain names instead of port numbers or names.
netstat -f
Will change foreign address names to port numbers.
netstat -s
Similar to the "route Print" command, it shows the routing table of your current network.
These are just some of the basic commands to get you started with the built in tool. You can combine parameters to show you information about your connections any way you want. For instance, you can combine -s and -e parameters to view the statistics for every protocol. Resources are available all over the internet to help you further learn and utilize these powerful built in tools.
You can also type netstat -help in the terminal to basic commands and options.
Open either Windows command with elevated privileges "Run As Admin" or the Linux terminal in su "switch user" and type "netstat" and hit enter.
To help you understand what you are viewing if new to this, is a brief list of explanations.
Proto: The network Protocol. It will either be TCP or UDP.
Local Address: The IP addresses and ports of your computers network interfaces for the given connections.
Foreign Address: The IP addresses and port names of the remote devices.
State: Indicates the state of the connection. Whether its active or closed ect.
Additional commands to help specify details in a targeted manor.
netstat -n
Used to view connection's port numbers instead of port names next to an IP address.
netstat -n 5
Since the system can and does disconnect and connect to networks, the details will change at intervals. This command is used to refresh netstat at intervals. The 5 in the command can be changed to another number to lengthen or shorten intervals.
"Keep in mind when you start a process as such "Control C" will stop that process in a terminal on both Windows and Linux.
netstat -a
Will display all connections that are active or inactive.
netstat -b
Will show statistics of incoming and out going packets.
netstat -e
Will show you fully qualified domain names instead of port numbers or names.
netstat -f
Will change foreign address names to port numbers.
netstat -s
Similar to the "route Print" command, it shows the routing table of your current network.
These are just some of the basic commands to get you started with the built in tool. You can combine parameters to show you information about your connections any way you want. For instance, you can combine -s and -e parameters to view the statistics for every protocol. Resources are available all over the internet to help you further learn and utilize these powerful built in tools.
You can also type netstat -help in the terminal to basic commands and options.