How Can You Find Out Which Process Is Listening On A Port On Windows
How Can You Find Out Which Process Is Listening On A Port On Windows
13 Answers
active oldest votes
C:\> netstat -a -b
(add -n to stop it trying to resolve hostnames, which will make it a lot faster)
Edit: +1 for Dane's recommendation for TCPView. Looks very useful!
-a Displays all connections and listening ports.
-b Displays the executable involved in creating each connection or listening port. In
up vote 382
some cases well-known executables host multiple independent components, and in
down vote
these cases the sequence of components involved in creating the connection or
accepted
listening port is displayed. In this case the executable name is in [] at the bottom, on
top is the component it called, and so forth until TCP/IP was reached. Note that this
option can be time-consuming and will fail unless you have sufficient permissions.
-n Displays addresses and port numbers in numerical form.
shareimprove this answer edited Nov 14 '13 at 7:56 answered Sep 7 '08 at 6:28
Community
Brad Wilson
1
25.1k45170
45 -o to get the PID Laurent K Jul 10 '12 at 8:03
and taskkill /PID <pid> to then terminate the process, using /F if appropriate.
20
BitMask777 Mar 4 '13 at 20:03
You may have to run your command line shell as administrator, otherwise you
may get an error message about insufficient privileges. Use the "Run as
7
administrator" option when right-clicking cmd.exe. Gruber Jul 29 '14 at
11:20
When doing this in cmd prompt, I'm getting a message as The requested
operation requires elevation. Please help me KingFeming Oct 28 '14 at 6:31
KingFeming: Gruber's comment above applies to you. Brad Wilson Oct 28
1
'14 at 14:20
add a comment
16
Dane
3,80541420
add a comment
netstat -aon | find /i "listening"
If you dont see a PID column, click on View / Select Columns. Select
PID.
using the 'Find' command allows you to filter the results. find /i "listening" will display
only ports that are 'Listening'. Note, you need the /i to ignore Case otherwise you would
type find "LISTENING". |find "port" will limit the results to only those containing the
up vote specific port number. Note, on this it will also filter in results that have the port number
15 down anywhere in the response string.
vote
answered Oct 8 '13 at 18:56
shareimprove this answer
Nathan24
322312
add a comment
If you'd like to use a GUI tool to do this there's SysInternals TCPView.
answered Sep 7 '08 at 6:40
up vote 6
down
shareimprove this answer
vote
Dave Webb
96.9k25207247
add a comment
netstat -a -o This shows the PID of the process running on a particular port.
Keep in mind the process id and go to Task manager and services or details tab and
end the process which has the same PID.
up vote 4
down vote
If want to kill any process have the id and use this commanf, so that port become
free
up vote 4
down vote
http://live.sysinternals.com/
UNC Path \\live.sysinternals.com
up vote 3
down vote
up vote 3 Follow these tools :- From cmd :- C:\> netstat -anob with Administrator
down vote privilege.
Above command will show all process list in brief every 5 seconds. To know more,
you can just go with /? command of windows , for E.g,
c:\>wmic /?
c:\>wmic process /?
c:\>wmic prcess list /?
add a comment
up vote 2 first we find process id of that particular task which we need to eliminate in order to
down vote get port free
type
netstat -n -a -o
after executing this command in windows command line prompt(cmd) select the pid
which i think the last column suppose this is 3312
now type
taskkill /F /PID 3312
u can now cross check by typing netstat command.
NOTE: sometimes windows doesn`t allow you to run this command directly on CMD
so first you need to go with this steps from start-> command prompt (right click on
command prompt, and run as administrator)
answered Aug 23 '14 at 15:25
shareimprove this answer
Pankaj Pateriya
262
add a comment
and netstat -ab tell you the application, but if you're not admin you'll
get "The requested operation requires elevation".
netstat -ao
up vote 1
It's not ideal, but if you use sysinternals Process Explorer you can go to specific
down
processes' properties and look at the TCP tab to see if they're using the port you're
vote
interested in. Bit of a needle and haystack thing, but maybe it'll help someone....
shareimprove this answer