Recently some of my ports always conflict with the port i want to open in window. I try to find out how can i know what programs or ports currently using in my computer? With a simple command, it will show exactly what i want to know. Please issue following command in windows command prompt.

Above command will show which ports open in my computer and what program hold the port. If you want to know more detail about netstat command , please issue following command also.

Command line for looking at specific port

Is there a way to examine the status of a specific port from the Windows command line? I know I can use netstat to examine all ports but netstat is slow and looking at a specific port probably isn’t.

Here is the easy solution of port finding…

In cmd:

netstat -na | find "8080"

In bash:

netstat -na | grep "8080"

In PowerShell:

netstat -na | Select-String "8080"

You can use the netstat combined with the -np flags and a pipe to the find or findstr commands.

Basic Usage is as such:

netstat -np  | find "port #"

So for example to check port 80 on TCP, you can do this: netstat -np TCP | find "80" Which ends up giving the following kind of output:

TCP    192.168.0.105:50466    64.34.119.101:80       ESTABLISHED
TCP    192.168.0.105:50496    64.34.119.101:80       ESTABLISHED

As you can see, this only shows the connections on port 80 for the TCP protocol.

I use:

netstat –aon | find "<port number>"

here o represents process ID. now you can do whatever with the process ID. To terminate the process, for e.g., use:

taskkill /F /pid <process ID>

Using NetStat to Check for Open Ports in Windows 10

One of the simplest ways to check for open ports is to use NetStat.exe. You can find this tool in the “System32” folder on Windows 10. With NetStat, you can see open ports or ports that a specific host uses.

Netstat is short for “network statistics.” It shows protocol statistics and the current TCP and IP network connections. The two commands needed to identify open ports in “netstat -ab” and “netstat -aon.”

Here’s an explanation of what each letter from the commands means.

  • “a” displays all connections and listening ports.
  • “b” shows all executables involved in creating each listening port.
  • “o” provides the owning process ID related to each of the connections.
  • “n” shows the addresses and port numbers as numerals.

Two commands are helpful, depending on your needs. The second option (netstat -aon) additionally provides a process ID you can later search for in the Task Manager.

Using ‘netstat -ab’ to Identify Open Ports

The first option you’ll use (netstat -ab) lists all active ports and the process’s name that uses them.

1 – In the Cortana Search Bar, type the following without quotes: cmd then select “Run as administrator.”

2 – Now, type netstat -ab without quotes, then press “Enter.”

3 – Wait for the results to load. Port names get listed next to each local IP address.

4 – Look for the port number you need, and if it says LISTENING in the State column, it means your port is “open.”

Using ‘netstat -aon‘ to Identify Open Ports

The second option (netstat -aon) includes process IDs, which you’ll use to identify a task/application in the Task Manager. Some processes may be challenging to identify using “netstat -ab,” so “netstat -aon” gets used. As referenced above, “a” represents all connections and ports, “o” represents the owning process ID, and “n” represents the addresses and port numbers as numerals.

Using “netstat -aon” comes in handy when “netstat -ab” isn’t enough to identify what program has a specific port tied up. In that case, follow these steps:

1 – In the Cortana Search Bar, type the following without quotes: cmd then select “Run as administrator” if not already opened.

2 – Once inside, type the following command without quotes: netstat -aon then press Enter.”

3 – You will now see five columns: ProtocolsLocal AddressForeign AddressState, and PID (Process ID). In the Local Address, you have a port number. For example: 0.0.0.0:135. Here, 135 is the port number.

4 – In the “State” column, you will see whether a specific port appears opened. For opened ports, it will say LISTENING.

5 – To verify which app uses a particular port, find the PID (the number from the last column) for a specific port.

6 – Open the “Task Manager” by pressing “Ctrl + Shift + Esc.”

7 – Go to the “Details” or “Services” tab to see all processes on your Windows 10 system. Sort them by the PID column to find the PID for the port you’re trying to troubleshoot. You can see which app uses the port in the Description section.

Windows 10 Open Ports FAQs

How do I check if Port 3306 is open in Windows 10?

To verify if port 3306 is open, you can use NetStat. We recommend NetStat, as you won’t have to download new software for this. Run the Command Prompt as administrator. Type the command: “netstat -ab” and hit “Enter.” Wait for the results to load. Port names will be listed next to the local IP address. Just look for port 3306. You can press “Ctrl + F” and type “3306” in the word box to search for it. If the port is open, it will show in the results as “LISTENING.”

Leave a Reply

Your email address will not be published. Required fields are marked *