If you wish to debug or track statistics about your network in a Linux environment you can use the netstat command. In this article, we will show the basic usage of the Linux netstat command that you can master on SSH, SSD VPS or a Dedicated Server.
Displaying all sockets – TCP and UDP
netstat -a
Displaying specific protocols
netstat -at # TCP netstat -au # UDP
Displaying all listening ports
netstat -l netstat -lt # TCP listening
Displaying all listening, over TCP and UDP, in numeric and their ports
netstat -tulnp