DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones Build AI Agents That Are Ready for Production
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
Build AI Agents That Are Ready for Production

"Platform Engineering & DevOps" Trend Report is now LIVE! Learn how internal platforms help developers ship faster with less friction

Join this live webinar to learn safer rollout techniques for schema changes, index testing, and database migrations.

Related

  • The Documentation Crisis Nobody Sees: Why AI Agents Are Breaking Faster Than Humans Can Document Them
  • Managing, Updating, and Organizing Agent Skills
  • Amazon Quick: AWS's Agentic Workspace, Explained for Engineers
  • Observability for Agents and Workflows: Tracing Prompts, Tool Calls, and Business Outcomes End-to-End

Trending

  • Implementing the Planning Pattern With Java Enterprise and LangChain4j
  • 5 Failure Patterns That Break AI Chatbots in Production
  • The AI Autonomy Spectrum: 7 Architecture Patterns for Intelligent Applications
  • Rust-Native Alternatives to Spark SQL and DataFrame Workloads
  1. DZone
  2. Coding
  3. Tools
  4. How To Check Which Process Is Using Port 8080 or Any Other Port on Windows

How To Check Which Process Is Using Port 8080 or Any Other Port 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.

By 
Gaurav Bhardwaj user avatar
Gaurav Bhardwaj
·
Updated May. 18, 22 · Tutorial
Likes (5)
Comment
Save
Tweet
Share
501.0K Views

Join the DZone community and get the full member experience.

Join For Free

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<port_number>  

  • -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

 tasklist | findstr <PID> 

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

 tasklist | findstr <application_name/process_name>   

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.

Use the Windows netstat command to identify which applications are using port 8080

  1. Hold down the Windows key and press the R key to open the Run dialog.
  2. Type “cmd” and click OK in the Run dialog.
  3. Verify the Command Prompt opens.
  4. Type “netstat -a -n -o | find "8080"". A list of processes using port 8080 is displayed. 
  • the symbol before the word "find" is the pipe symbol ("|") and not a lower-case l.
  • the outer quotes should NOT be entered. Quotes around the port number are required.

If one or more processes make use of port 8080, then the processes are displayed. If no method accesses port 8080, then no information is restored.

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.

MS Windows Tool

Opinions expressed by DZone contributors are their own.

Related

  • The Documentation Crisis Nobody Sees: Why AI Agents Are Breaking Faster Than Humans Can Document Them
  • Managing, Updating, and Organizing Agent Skills
  • Amazon Quick: AWS's Agentic Workspace, Explained for Engineers
  • Observability for Agents and Workflows: Tracing Prompts, Tool Calls, and Business Outcomes End-to-End

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook