Find out which program is using a specific port in Windows

You installed a service and it won’t run because a specific port number is already in use. You can find out which program is using it from your command line. Let’s say you want to find out which program is using port 80.

Fist, use netstat to list active TCP/IP-connections and pipe it through Find:

netstat -aon | find ":80"

Here’s what my laptop says:

TCP  0.0.0.0:80    0.0.0.0:0  LISTENING  4024
TCP  0.0.0.0:8000  0.0.0.0:0  LISTENING  4
TCP  [::]:8000     [::]:0     LISTENING  4

What we’re looking for is port 80, not 8000 so that leaves one process number, namely process number 4024.

Next, find out what process number 4024 is with the Tasklist command:

tasklist | find "4024"

My laptop says:

Skype.exe  4024 Console   1   126.148 kB

Seems like it’s Skype that’s occupying port 80.

One comment

Comments are closed.

Back to Top