View network connections, ports and process


View network connections, ports and process:

lsof command example

Type the following command to see IPv4 port(s), enter:
# lsof -Pnl +M -i4

Type the following command to see IPv6 listing port(s), enter:
# lsof -Pnl +M -i6

Process information
# lsof -p PID

netstat command example


Type the command as follows:
# netstat -patun

OR
# netstat -netpl


How to list open ports and application using them in Windows

  netstat -abn or netstat -a -n -p tcp -o

Mais vistos