Windows:

The Netstat.exe utility has a switch, that can display the process identifier (ID) that is associated with each connection to identify port conflicts. This information can be used to determine which process (program) listens on a given port.

Using Netstat command:

  1. Open a CMD prompt
  2. Type in the command: netstat -ano -p tcp
  3. You'll get an output similar to this one
  4. Look-out for the TCP port in the Local Address list and note the corresponding PID number

How-to-determine-which-program-uses-or-blocks-a-port-in-Windows_01.png

If you use Task Manager, you can match the process ID that is listed to a process name (program). This feature enables you to find the specific port that a program currently uses. Because this specific port is in use already by a program, another program is prevented from using that same port.

To match the process ID to a program using Task Manager:

  1. Press CTRL+ALT+DELETE, and then click Task Manager.
  2. Click the Processes tab.
  3. If you do not have a PID column, click View, click Select Columns, and then click to select the PID (Process Identifier) check box.
  4. Click the column header that is labeled "PID" to sort the process by their PIDs. You should be able to easily find the process ID and match it to the program that is listed in Task Manager. 

To match the process ID to a program using the command line:

Example to find which process uses TCP port 9443:

C:\>netstat -ano -p tcp |find "9443"

How-to-determine-which-program-uses-or-blocks-a-port-in-Windows_02.png

Process with PID 1400 is listening on TCP port 9443. Now we can query task list to find the process.

C:\>tasklist |find "1400"

How-to-determine-which-program-uses-or-blocks-a-port-in-Windows_03.png
Here is a normal situation where EveryonePrint Web service is using TCP port 9443.

Linux:

The Netstat.exe command has a switch, that can display the process identifier (PID) that is associated with each connection to identify port conflicts. This information can be used to determine which process (program) listens on a given port.

Using Netstat command:

  1. Open a terminal
  2. Type in the command: sudo netstat -ano -p tcp
  3. You'll get an output similar to this one
  4. Look-out for the TCP port in the Local Address list and note the corresponding PID number

How-to-determine-which-program-uses-or-blocks-a-port-in-Linux_01.png

To match the process ID to a program:

From the netstat list you already know the Program name, you can have further details about it using the following command: 

ps -ef | grep <PID number>

Finding certificate details with thumbprint or name with Powershell:


Get-ChildItem -path 'Cert:\*CertificateThumbprintWithoutAnySpaces' -Recurse | Format-List 

Get-ChildItem -path 'Cert:\*b558e239f239bb87197eca54748e8c6e8be45aa9' -Recurse | Format-List