netstat command to find open ports
# netstat --listenTo display open ports and established TCP connections, enter:
$ netstat -vatnTo display only open UDP ports try the following command:
$ netstat -vaunIf you want to see FQDN (full dns hostname), try removing the -n flag:
$ netstat -vatlsof Command Examples
To display the list of open ports, enter:
To display all open files, use:
To display all open IPv4 network files in use by the process whose PID is 9255, use:
# lsof -iTo display all open files, use:
# lsofTo display all open IPv4 network files in use by the process whose PID is 9255, use:
# lsof -i 4 -a -p 9255

No comments:
Post a Comment