NetStat (Networking Statistics) is a command-line tool for monitoring network connections both incoming and outgoing as well as viewing routing tables, network statistics, etc.
Usage of netstat:
1. Listing all the LISTENING PORTS of TCP and UDP:
Listing all the Listening ports (both TCP and UDP) can be done using the netstat -a command.
2. Listing all the PORTS of the only TCP:
To list only the TCP port connections, netstat -at is used.
3. Listing all the PORTS of the only UDP:
To list only the TCP port connections, netstat -au is used.
4. Listing all the existing LISTENING CONNECTIONS:
To list all the listening ports, netstat -l is used.
5. Listing all the LISTENING PORTS of the only TCP:
To list all the listening ports under TCP, netstat -lt is used.
6. Listing all the LISTENING PORTS of the only UDP:
To list all the listening ports under UDP, netstat -lu is used.
7. Listing all the LISTENING PORTS of the only UNIX:
To list all the listening ports of UNIX, netstat -lx is used.
8. Showing Statistics by PROTOCOL:
To show the network statistics for each protocol, the netstat -s command is used.
9. Showing Statistics by TCP PROTOCOL:
To show the network statistics for TCP protocol, the netstat -st command is used.
10. Showing Statistics by UDP PROTOCOL:
To show the network statistics for UDP protocol, the netstat -su command is used.
11. Displaying IPv4 and IPv6 information:
To display the IPv4 and IPv6 information of the network, the netstat -g command is used.
Name | Views | Likes |
---|---|---|
Usermod command in Linux | 4510 | 1 |
SSH Command In Linux | 788 | 7 |
Introduction to Named Pipes | 1057 | 3 |
Linux KILL Command | 2782 | 5 |
Soft Link and Hard Link In Linux | 421 | 2 |
Vi Editor in Linux | 594 | 6 |
FDisk Command in Linux | 540 | 5 |
How to view the History in Linux | 448 | 2 |
Process Manipulation in Linux | 1614 | 4 |
Export command in Linux | 410 | 1 |
ID command in Linux | 413 | 1 |
Netstat Command in Linux | 624 | 3 |
Chmod Command in Linux | 437 | 1 |
Compressing Files in Linux | 354 | 1 |
Crontab in Linux | 477 | 1 |
File Manipulation in Linux | 615 | 5 |
Curl Command in Linux | 505 | 1 |
Env Command in Linux | 397 | 5 |
LSOF Command in Linux | 406 | 1 |
User Manual in Linux | 433 | 1 |
Whereis command in Linux | 436 | 1 |
4 Lesser Known Commands in Linux | 468 | 6 |
Shell Scripting in Linux | 631 | 4 |
Alias command in Linux | 373 | 1 |
How to Kill a Process using Command Line | 471 | 3 |
Comments