How-To: Determine which program is using a given port

How-To: Determine which program is using a given port

To discover which program is using a given IP address and port number on the computer


  1. click on the Start button in Windows and type 'CMD'
  2. when the CMD icon appears in the list, right-click on the icon and Run As Administrator
  3. in the command prompt window, enter the following command and then hit the enter key

    netstat -a -n -p tcp -b

This will show all services running, protocal used, local and foreign address, state and PID (process identifier).


You can also use the following process outlined by Microsoft KB Article# 281336:(https://technet.microsoft.com/en-us/library/bb490947.aspx)

To determine which IP/Port is being used by a given program, use the following command:

NETSTAT -p tcp -ano 

The Netstat.exe utility has a new switch, the -o switch, that can display the process identifier (ID) that is associated with each connection. This information can be used to determine which process (program) listens on a given port. For example, the netstat -ano command can produce the following output:

Proto Local Address Foreign Address State PID

TCP 0.0.0.0:80 0.0.0.0:0 Listening 888

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.

  1. Launch Task Manager, click 'Start', then 'Run', and enter TASKMGR.EXE.
  2. Go to the PROCESSES tab. If you do not see a PID column, click VIEW, SELECT COLUMNS, and then click to select the PID check box.
  3. 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.

If you know that your Titan Server will be listening on port 21 (or port 22 for SFTP), you can further focus the output by using 'findstr', such as

netstat -p tcp -ano | findstr :21

This will search the netstat output for any entry that is using port 21. You can specify :22 instead of :21 to find services listening on port 22.


    • Related Articles

    • How To: Check if a Specified Port is in Use

      How To: Check if a Specified Port is in Use Question I restarted my Titan Server, and I get the message “Error Starting Server: Port conflict”. I Checked the server, and the specified port is not in use. Reasoning A port conflict error typically ...
    • How To - Reset Admin Account using sqllitestudiocli

      How To: Reset Admin Account using SQLliteStudio CLI Question How can you reset the admin account? Reasoning When an admin user can't log in and support ticket submission isn't possible, one way to regain access is by directly modifying or clearing ...
    • How To: Generate SSH Key Pairs using PuttyGen

      How To: Generate SSH Key Pairs using PuttyGen Question If you get an error saying “Server refused public-key signature despite accepting key" error generated when trying to import/create a 2048 bit DSA key pair. Answer To create a 2048 bit DSA host ...
    • Custom Branding using PowerShell Script

      Titan Server: Custom Branding and Logo using PowerShell Question How do I custom brand the interface for Titan Server using a PowerShell script? Reasoning I want the interface to match my organization’s look and feel. Answer Yes, the server interface ...
    • How To - Login using Curl for Windows using Host Keys Authentication with Titan SFTP

      How To - Login using Curl for Windows using Host Keys Authentication with Titan SFTP Question How to connect Curl using Host Key authentication running in Windows Pre-requisites Curl for Windows, Titan SFTP, SSH Key pairs Steps Download and install ...