Start--run--cmd Enter the command prompt input Netstat-aon you can see all the connected PID in the task Manager to find the program corresponding to this PID if the task Manager does not have the PID this item, you can select "View"-"Choose Column" in Task Manager
Often, when we start the application to find that the system needs the port to be occupied by other programs, how to know who owns the port we need, many people have a headache, the following is a very simple method, I hope to be useful if we need to determine who occupies our 80 ports
1. Windows platform
Execute under Windows command Line window:
The code is as follows:
C:>netstat-aon|findstr "80"
TCP 127.0.0.1:80 0.0.0.0:0 Listening 2448
Do you see that the port is occupied by a process number 2448 process, and continue with the following command:
The code is as follows:
C:>tasklist|findstr "2448"
Thread.exe 2016 Console 0 16,064 K
It's clear that thread takes up your port, kill it
If the second step is not found, then open Task Manager, see which process is 2448, and then kill it. If you need to see additional ports. get rid of 80.
You know, using the lsof +p port number on Linux, the process of viewing ports using this command, you can see that all open ports under win are occupied by that system program and PID of the program.
N years ago when the test to solve the problem of port occupancy when the command, think half a day to recall. Share to everyone. For the convenience of memory parameters written no AB more parameters please refer to netstat/?
----is the excerpt part of the output--
Netstat-noab
Active connections
Proto Local address Foreign address State PID
TCP 0.0.0.0:135 0.0.0.0:0 Listening 996
C:windowssystem32ws2_32.dll
C:windowssystem32rpcrt4.dll
C:windowssystem32rpcss.dll
C:windowssystem32svchost.exe
C:windowssystem32advapi32.dll
[Svchost.exe]
TCP 0.0.0.0:445 0.0.0.0:0 Listening 4
[System]
TCP 0.0.0.0:2967 0.0.0.0:0 Listening 1776
[Rtvscan.exe]
TCP 72.71.0.24:139 0.0.0.0:0 Listening 4
[System]
TCP 127.0.0.1:1049 0.0.0.0:0 Listening 232
[Alg.exe]
TCP 127.0.0.1:1060 0.0.0.0:0 Listening 2104
[CcApp.exe]
Work for fun,live for love!