How to check which ports are currently in use using netstat?

To check port usage, enter the following command in the command prompt or terminal window:

netstat -ano

This command will display all network connections and their respective port numbers, along with the process ID (PID) of each connection. You can use the PID to find the corresponding process and determine which program is using a specific port.

You can use the following command if you only want to check the usage of specific ports.

netstat -ano | findstr <端口号>

” is the port number you want to check, such as 80 or 8080. This command will only display the connection information related to the specified port.

bannerAds