Current location - Quotes Website - Collection of slogans - The window views commands such as port occupation, corresponding process and killing process through cmd.
The window views commands such as port occupation, corresponding process and killing process through cmd.
How to view the ports occupied by programs

One,

View the ports occupied by all processes.

In start-run -cmd, enter: netstat.

Ano can view all processes.

Second, check the program that occupies the specified port.

When you publish a program with tomcat, you often encounter the situation that the port is occupied. We want to know which program or process occupies the port, so we can use this command.

netstat

ano|findstr

Specify the port number?

Second, check the program that occupies the specified port.

When you publish a program with tomcat, you often encounter the situation that the port is occupied. We want to know which program or process occupies the port, so we can use this command.

netstat

ano|findstr

Specify the port number?

Second, check the program that occupies the specified port.

When you publish a program with tomcat, you often encounter the situation that the port is occupied. We want to know which program or process occupies the port, so we can use this command.

netstat

ano|findstr

Specify the port number?

For example, query the process that occupies port 8080: netstat.

-ano|findstr

"8080"

Third, kill related processes through the task manager.

Method 1: Use Task Manager to terminate the process.

Open the task manager-> View-> Select column-> Then check the pid option, return to the task manager to check the corresponding PID, and then end the process.

Of course, the above method is not easy to use sometimes, that is, when there are many processes in the task manager, it is very troublesome to find the corresponding process, so there is another way to kill the process.

Method 2: Use the command to terminate the process.

1 & gt; First, find the process name corresponding to the process number.

Task List | Find String

Process number

For example: tasklist|findstr

3 1 12

2> Then kill the process according to its name.

Task killer

/f

/t

/instant message

Process name

Task killer

/f

/t

/instant message

/javaw.exe