over 7 years ago
The common command line arguments that I use with the netstat
command:
-t: display tcp connections
-u: display udp connections
-l: display ports that are in LISTEN state
-p: display process id
-n: display ip addresses instead of host names
To see if a port has been occupied:
> netstat -tulpn | grep :port_number