Check Running Ports in Linux

To check the running ports, you can use the following command:

  1. Using the netstat command:
netstat -tuln

This command will list all the TCP and UDP ports that are currently listening.

  1. Use the ss command:
ss -tuln

The ss command can also be used to display the TCP and UDP ports that are currently running.

  1. Using the lsof command:
lsof -i -P -n | grep LISTEN

This command will list all the network connections that are currently being monitored.

With the above command, you can view the running ports and their corresponding process information.

bannerAds