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 free TCP and UDP ‘ports’ through which they 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 we’ve decided to write this guide that will show you how to get an overview of your ports and see which applications are using which ports.
Command Prompt Method
Probably the simplest way to see which port is used by which process 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 an 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 that 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.
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 out 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 to find 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.
Those are two of the best methods for checking which ports are in use, which aren’t, and whether there are any processes that should or shouldn’t be listening on ports. It gives you more control over the network connections constantly being made on your PC, which is more important than ever to keep a grasp on.