Linux, Ports & Services



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

• -P : This option inhibits the conversion of port numbers to port names for network files. Inhibiting the conversion may make lsof run a little faster. It is also useful when port name lookup is not working properly.
• -n : This option inhibits the conversion of network numbers to host names for network files. Inhibiting conversion may make lsof run faster. It is also useful when host name lookup is not working properly.
• -l : This option inhibits the conversion of user ID numbers to login names. It is also useful when login name lookup is working improperly or slowly.
• +M : Enables the reporting of portmapper registrations for local TCP and UDP ports.
• -i4 : IPv4 listing only
• -i6 : IPv6 listing only

Type the command as follows:
# netstat -tulpn
OR
# netstat -npl

$ cat /etc/services
$ grep 110 /etc/services
$ less /etc/services

https://www.cyberciti.biz/faq/find-out-which-service-listening-specific-port/

Categories: , Share

Leave a Reply