- How to Check for Ports in Use in Windows 10
- Use Nirsoft CurrPorts
- Command Prompt Method
- TCPView
- How to Check Which Process Is Using Port 8080 or Any Other Port (and Vice Versa) on Windows
- Learn how to see which process or application is using a particular port, and likewise, which port is being used by a particular process.
- How to Check Which Process/Application Is Using a Particular Port on Windows
- Step 1 — Find the Process id of the Process Using the Given Port
- Syntax
- Explanation
- netstat -aon
- findstr 8080
- Step 2 — Find the Process/Application Name Using the Given Port Using the Process id Found in Step 1
- Syntax
- How to Check Which Port Is Being Used by a Particular Process/Application on Windows
- Step 1 — Find the Process id of the Process Using a Process With the Given Name
- Syntax
- Step 2 — Find the Port Being Used by the Process id Found in Step 1
- Summary
- How to Determine What Ports are Being Used in Windows 10
- What is a Port?
- Determine What Ports are Being Used in Windows 10
- How to check which TCP/IP ports are in use in Windows 8?
- TCP/IP ports
- Use the command line and Task Manager to check the ports
- About Nick
How to Check for Ports in Use in Windows 10
At any one time, there’s a whole bunch of information being sent between your Windows 10 PC and the endless void of the Internet. This is done using a process whereby network-dependent processes seek out TCP and UDP ports, which they use to communicate with the Internet. First, your data gets sent to remote ports at the destination or website your processes are trying to connect to, then it gets received at local ports back on your PC.
Most of the time, Windows 10 knows how to manage ports and ensure that traffic is being directed through the right ports so that those processes can connect with what they need to. But sometimes two processes may be assigned to one port, or maybe you just want to get a better picture of your network traffic and what’s going in and out.
That’s why wrote this guide that shows you how to get an overview of your ports and see which applications are using which ports.
Use Nirsoft CurrPorts
NirSoft is one of the best indie software developers, giving us great utilities, like PassView and WirelessKeyView. While some people will prefer checking their ports without installing third-party software (in which case, scroll down to the CMD method), CurrPorts is easily the fastest and most convenient way to view your ports.
Once you’ve installed CurrPorts, just open it to see a list of all your ports currently in use. If you’re looking for local ports in use, just click the “Local Port” column at the top to order the list by port number (handy if you’re looking for a specific one). You can do the same thing with remote ports, too.
If you want to really find specific ports, click the “Advanced Filters” icon at the top and enter your string in the format they suggest. It should look something like the below image.
Hit OK when you’re ready, and the list will filter down to your queries.
Command Prompt Method
The integrated – though not necessarily the simplest – way to check open ports is to use the trusty command prompt.
Click the Start button, type cmd , then right-click “Command Prompt” when it shows up in the search results. Click “Run as administrator.”
Once you’re in the elevated command prompt, enter the following command:
This will steadily bring up a list of ports that is probably quite long, along with the Windows processes that are using them. (You can press Ctrl + A , then Ctrl + C to copy all information to the clipboard.) On the average PC, there will be two main local IP addresses that contain ports on your PC.
The first, in our case, is “127.0.0.1.” This IP address is otherwise known as “localhost” or a “loopback address,” and any process listening to ports here is communicating internally on your local network without using any network interface. The actual port is the number you see after the colon. (See image below.)
The bulk of your processes will probably be listening to ports prefixed with “192.168.xxx.xxx,” which is your IP address. This means the processes you see listed here are listening for communications from remote Internet locations (such as websites). Again, the port number is the number after the colon.
TCPView
If you don’t mind installing a third-party app and want to have more control over what’s going on with all your ports, you can use a lightweight app called TCPView. This immediately brings up a list of processes and their associated ports.
What make this better than the command prompt is that you can actively see the ports opening, closing and sending packets. Just look for the green, red and yellow highlights. You can also reorder the list by clicking the column headings, making it easier to find the process you want or two separate processes vying for the same port.
If you do find a process or connection you want to close, just right-click that process. You can then select “End process,” which is exactly the same function as the one in Windows task manager. Or you can click “Close Connection” to leave the process open but stop it from listening on a given port.
If you’re having some trouble in Windows 10, then see whether a Windows update may be causing it. We also have a handy guide for managing the health of your hard drive in Windows 10.
Related:
Content Manager at Make Tech Easier. Enjoys Android, Windows, and tinkering with retro console emulation to breaking point.
How to Check Which Process Is Using Port 8080 or Any Other Port (and Vice Versa) on Windows
Learn how to see which process or application is using a particular port, and likewise, which port is being used by a particular process.
Join the DZone community and get the full member experience.
Hello friends. In this tutorial, you will learn
- How to check which process/application is using a particular port on Windows
- How to check which port is being used by a particular process/application on Windows
How to Check Which Process/Application Is Using a Particular Port on Windows
Step 1 — Find the Process id of the Process Using the Given Port
Syntax
netstat -aon | findstr
-a Displays all connections and listening ports.
-o Displays owning process Id associated with each connection.
-n Displays addresses and port numbers in numerical forms
On my system, it displays the following output. My Tomcat is up and running on port 8080 within Eclipse and I executed the following command.
netstat -aon | findstr 8080
Here the last column is telling the process id of the process which is using port 8080.
Explanation
netstat -aon
Will give you a list of process Ids which are using given port.
findstr 8080
findstr is functionally equivalent to grep command on Linux. From the output of netstat, findstr will give the lines which have word 8080 in it.
Step 2 — Find the Process/Application Name Using the Given Port Using the Process id Found in Step 1
Syntax
This will give you the application name which is using that port.
On my system, I used the following command to check which process belongs to process id 9260.
tasklist | findstr 9260
Here, javaw.exe is the process which is using port 8080.
How to Check Which Port Is Being Used by a Particular Process/Application on Windows
Step 1 — Find the Process id of the Process Using a Process With the Given Name
Syntax
On my system, I executed the following command to find first process id of a process with name javaw.exe
tasklist | findstr javaw.exe
Here, 9260 is the process id of the process javaw.exe.
Step 2 — Find the Port Being Used by the Process id Found in Step 1
On my system, to find which port is being used by a process with process id 9260, I run
netstat -aon | findstr 9260
As you can see in the above output, process 9260 is using port 8080.
Summary
In this tutorial, you learned
Use of the netstat command with -aon options together with the findstr command to find out which process is using a particular port, and vice versa.
Thanks for reading. Share it with someone you think it might help.
Published at DZone with permission of Gaurav Bhardwaj . See the original article here.
Opinions expressed by DZone contributors are their own.
How to Determine What Ports are Being Used in Windows 10
Last year we suffered the BitCoin miner virus which locked our computer and levied a ransom. And yet, the main reason for the spread of the virus was that the unused ports did not close. So, to guard against happening again, we have to determine what ports are being used in windows and then turn it off.
What is a Port?
When it comes to port, it’s necessary to talk about IP as well. Let me draw an analogy to describe the relationship between the Port and IP. Once upon a time, if you want to send a letter to your friend in a faraway place, you need to write down your address and his address on the envelope. The envelope is amount to the data package while both addresses are amount to IP. When the postman sends the letter to your friend’s house, and if your friend opens the door to get it, now the door is equal to the port. If your friend doesn’t open the door, that is to say, the port closed. After that, the letter will be sent back to you. In network technology, ports divide into two classes. One is a physical port, such as USB port. The second is the logical port, which generally refers to the port in the TCP/IP protocol. These port will cause some virus and harm your PC. As a result, there is necessary to check if the port is open.
Determine What Ports are Being Used in Windows 10
Step 1: Hit Windows + R to invoke Run dialog and type cmd to open Command Prompt.
Step 2: Type netstat -ano to list states of all ports.
Alternatively, type telnet
to check if port is open.
Step 3: Locate to the target port and view the corresponding PID in the final column. For example, the PID of port 2179 is 3800.
Step 4: Input tasklist|findstr “3800” and hit Enter on the keyboard to view which service takes up the port.
Step 5: To end up this service, run taskkill /f /t /im vmms.exe.
13 people found this article useful This article was helpful
How to check which TCP/IP ports are in use in Windows 8?
Every programs need to occupy an available port or socket for being connected to a network. The network may be an Intranet or it can be the internet. Suppose you are connecting two or more computers through LAN, or you are making a cluster of computers for some high performance work, you need to communicate between the programs running in those computers. For that you need to know the IP address and the port/socket number to find any specific application. If you only tell the name of the application, then that won’t work. Because behind the scene, each application is uniquely identified by its unique id and these Ids are associated with the ports or sockets.
TCP/IP ports
Each application used its current socket for its entire lifetime. i.e., it can get a new port address when you run it for the next time. but it can’t change once it got a port number till the termination.
Some applications have dedicated fixed ports, like HTTP (Hyper Text Transfer protocol) uses port 80, FTP (File Transfer Protocol) uses port 21 or 20, Telnet has dedicated port 23,
SMTP (Simple Mail Transfer Protocol) uses port 25 etc. Port number 1 to 1024 are reserved for these system tasks purpose. The other port addresses are used for other applications.
To check which application is using what port, you can follow the procedure shown below.
Use the command line and Task Manager to check the ports
1. Open the Task Manager, by right clicking on the taskbar and then selecting Open Task Manager
or by pressing the buttons Ctrl + Shift + Esc. Now go to the File Tab -> Run new task.
2. Then you will see Run window. Check the box at the bottom showing Create this task with administrative privileges to run the task as an administrator.
Write cmd into the input area and press Enter. Or you can simply use the Quick Access Menu by pressing Windows + X.
Now, the administrative command prompt will appear. You will see Administrator is written in the bar. It indicates that you have the privilege to perform administrative tasks.
3. Now, simply type this command
netstat -aon | more
in the command prompt
and press Enter.
4. Now you will see a table with the Local Address column, which will show you the port address and PID column, which shows the Process Identifier (PID) number of the process which is listening (using) to that particular port. In the figure given below, from the table, you can see that Local Address 0.0.0.0:554 or port 554 is being used (Listening) by the process having the PID 6492.
The PID is the unique identifier for each and every process and no other process can get this ID when this process is running. This PID can be given to another process after the termination of this one.
5. Now, open theTask Manager and navigate to the Services tab, there you will get the PIDs of all programs running correctly. Here I find that can see that WMPNetworkSvc has the PID 6492 and currently, it is running. So it is clear that WMPNetworkSvc is using port 554 now. You can terminate this program to release the port from this application.
Thus you can easily checkout, which port is listening to which program and what are the available ports.
About Nick
Nick is a Software Engineer. He has interest in gadgets and technical stuffs. If you are facing any problem with your Windows, feel free to ask him.