Current location - Quotes Website - Team slogan - Linux to see which ports are being monitored.
Linux to see which ports are being monitored.
First, the most commonly used methods:

1,netstat -an

2、lsof -i

The above two commands list the ports that are listening to the network by querying the network stack.

Check the monitoring information of the port.

Netstat -anp | grep port number

Lsof -i | grep port number

Secondly, use the port scanner nmap to check which ports are listening to the network.

Example: Determining which ports are listening for TCP connections from the network is:

Nmap -sT -O local host