windows depending on the port end of the process (detailed)

 

1. Open cmd

2. Enter the command:

Example: Find 800 port

netstat -ano | findstr  8000

The meaning of these parameters are:

and a display connected to all listening ports   

n address and port number displayed digitally

The PID associated o

-------------------------------------------------

| Is to send content to use in front of the vertical line behind here is to send the command netstat -ano check out a bunch of results to the findstr command

findstr meaning 8000 is a line that contains 8000 these characters in the data (if you are looking to put another 8000 replace the need to find characters)

 Execution finished like this:

 

LINSTRNING behind PID is the process ID

3. Get the process ID of the process can be directly off the end (adjusted 4), you can also look at the name of this process

Entry 

tasklist /FI "pid eq 4752"

tasklist is to display all processes

-FI tasklist command parameters are filtering belt, according to the name of the window, PID, affect the name, user name, and other criteria to filter the specific type:

tasklist /?

View Help. /? You can view all the help command method

Here pass filtration filter parameter is "pid eq 4752". It means pid equals (equal) 4752

(Of course, you can also use findstr but must be the character before the vertical bar, there we need to find characters for the job)

After you enter you can see

Java.exe is being occupied by the port.

4. End the port

taskkill /F /FI "pid eq 4752"

Here task list back into a kill, meant to kill the process

Tasklist than can be seen with more a parameter -F

This means -F forced to kill the process. If not, then just tell -F process "you have to stop," but the process will not necessarily really stopped. -F is not added after consultation parked directly

After input:

 

Guess you like

Origin www.cnblogs.com/kuibuqianli/p/10959035.html