Skip to content

TechDirectArchive

Hands-on IT, Cloud, Security & DevOps Insights

  • Home
  • About
  • Advertise With US
  • Reviews
  • Contact
  • Toggle search form
Home » Windows » How to use Netstat.exe to confirm which Program uses or blocks a port
  • VPNonWindows
    Configure VPN on Windows Server: How to allow remote VPN Access for Domain or Local Users Windows Server
  • Protect OOTBI
    Best Storage for Veeam: Comparing OOTBI by ObjectFirst to VHR Backup
  • How to Change the Default Web Browser on Windows 11 banner
    How to Change the Default Web Browser on Windows 11 Windows
  • wingettool
    Install Applications with Winget CLI on Windows Windows Server
  • windowsztrf
    Microsoft Desktop Optimization Pack [MDOP] at a glance Windows
  • Encapsulationset to Auto
    Error – Command rejected: An interface whose trunk encapsulation is “Auto” can not be configured to “trunk” mode Network | Monitoring
  • How to Force Stop a Grayed Out Windows Service
    How To Force Stop A Windows Service When Stop Option Is Grayed Out Windows
  • sdfdghjk
    How to fix “Job for Mattermost service failed” error Linux

How to use Netstat.exe to confirm which Program uses or blocks a port

Posted on 27/03/202328/08/2024 Temitope Odemo By Temitope Odemo No Comments on How to use Netstat.exe to confirm which Program uses or blocks a port
How-to-use-Netstat.exe-to-confirm-which-Program-uses-or-blocks-a-port

In this article, we will learn how to use Netstat.exe to confirm which Program uses or blocks a port. There are times when you will be installing an application that makes use of a particular port number. This same port number is already in use on the system. The next thing to do is to know which application or program is making use of this port number. You may want to know How to change the default RDP port in Windows and How to fix a Telnet Error: Could not open a connection to the host, on the port, connect failed, and How to Protect Thunderbolt ports in Windows.

Kindly refer to the YouTube Video. A Netstat.exe utility can display the PID of all connections or program that is having port conflicts.

This utility tool can be used to determine which process or program is listening on a given port that you intend to use.

Use Netstat.exe to confirm which Program uses or blocks a port

Assuming you are setting up a WAMP server with a MySQL server port 3306. But you discover it conflicts with another process or program on the system using the same port. Follow the below steps on using netstat command to resolve this conflict.

Wamp-Port-Number

How to use netstat.exe to confirm which Program uses

To confirm all current ports in use, open the command prompt and type this command: netstat -ano -p tcp

The-Netstat-Command-in-Windows

2. Check the below image for the Active Connections. Showing the Protocol, Local Address & Port, State and the Process Identifier (PID). Confirm the Port and look for the corresponding PID for the specific port.

In the next step I will show you how to locate a specific program or process very easily.

Active-Connections-on-Ports

Matching the Process ID

3. When a specific port is in use by a program, another program will be prevented from using the same port. Sometimes it may be difficult to quickly locate the PID.

Using this command which will help to match the process ID:

netstat -ano -p tcp |find "port number"
The-Command-to-find-PID

Please see Task Kill Vs Stop Process: How to forcefully kill or stop a process in Windows, and

Querying the Tasklist

4. The Process above has a PID 8004 listening on TCP port 3307. Use this command to query task list and find the process: tasklist |find “PID”. When you check the image below it shows that a MySQL program or process is currently using the port . This can be confirmed on the task manager.

The-task-List-Command

Also, see How to change the default RDP port in Windows,. How to Allow a blocked app: Application blocked unable to run and apply settings, and how to save netstat command output to a text.

Linux Netstat Command

5. You can do the same task above on a linux system by using this command:

sudo netstat -ano -p tcp. 

You will see all the Nodes or Ports and the corresponding PID.

The-Netstat-Command-in-Linux

I hope you found this blog post Interesting and helpful on how to use Netstat.exe to confirm which Program uses or blocks a port. If you have any questions do not hesitate to ask in the comment section.

5/5 - (1 vote)

Thank you for reading this post. Kindly share it with others.

  • Click to share on X (Opens in new window) X
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on Pinterest (Opens in new window) Pinterest
  • Click to share on Tumblr (Opens in new window) Tumblr
  • Click to share on Telegram (Opens in new window) Telegram
  • Click to share on WhatsApp (Opens in new window) WhatsApp
  • Click to share on Pocket (Opens in new window) Pocket
  • Click to share on Mastodon (Opens in new window) Mastodon
  • Click to share on Bluesky (Opens in new window) Bluesky
  • Click to share on Threads (Opens in new window) Threads
  • Click to share on Nextdoor (Opens in new window) Nextdoor
Linux, Windows Tags:Microsoft Windows, Network Monitoring, Task Manager, Windows 10, Windows 11, Windows Server 2016

Post navigation

Previous Post: Unable to Ping an EC2 Instance
Next Post: Deploy Legacy App to Azure Fileshare

Related Posts

  • Slide1 1
    Create Multiple Users with Passwords in Ubuntu Linux Linux
  • disable camera in Windows
    How to disable Camera Access in Windows Windows
  • scroll
    How to Take a Scrolling Screenshot on Windows 11 Windows
  • microsoft confirms some pcs freeze after windows 10
    How to deploy images to computers using PXE Boot Windows
  • Fixed Sysprep Generalize 1
    How to Fix The Virtual Desktop is Not Sysprep Generalized Virtualization
  • ClamAV
    How to install and manage ClamAV and ClamTK on Ubuntu Linux Anti-Virus Solution

More Related Articles

Slide1 1 Create Multiple Users with Passwords in Ubuntu Linux Linux
disable camera in Windows How to disable Camera Access in Windows Windows
scroll How to Take a Scrolling Screenshot on Windows 11 Windows
microsoft confirms some pcs freeze after windows 10 How to deploy images to computers using PXE Boot Windows
Fixed Sysprep Generalize 1 How to Fix The Virtual Desktop is Not Sysprep Generalized Virtualization
ClamAV How to install and manage ClamAV and ClamTK on Ubuntu Linux Anti-Virus Solution

Leave a Reply Cancel reply

You must be logged in to post a comment.

Microsoft MVP

VEEAMLEGEND

vexpert-badge-stars-5

Virtual Background

GoogleNews

Categories

veeaam100

sysadmin top30a

  • VPNonWindows
    Configure VPN on Windows Server: How to allow remote VPN Access for Domain or Local Users Windows Server
  • Protect OOTBI
    Best Storage for Veeam: Comparing OOTBI by ObjectFirst to VHR Backup
  • How to Change the Default Web Browser on Windows 11 banner
    How to Change the Default Web Browser on Windows 11 Windows
  • wingettool
    Install Applications with Winget CLI on Windows Windows Server
  • windowsztrf
    Microsoft Desktop Optimization Pack [MDOP] at a glance Windows
  • Encapsulationset to Auto
    Error – Command rejected: An interface whose trunk encapsulation is “Auto” can not be configured to “trunk” mode Network | Monitoring
  • How to Force Stop a Grayed Out Windows Service
    How To Force Stop A Windows Service When Stop Option Is Grayed Out Windows
  • sdfdghjk
    How to fix “Job for Mattermost service failed” error Linux

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 1,836 other subscribers
  • RSS - Posts
  • RSS - Comments
  • About
  • Authors
  • Write for us
  • Advertise with us
  • General Terms and Conditions
  • Privacy policy
  • Feedly
  • Telegram
  • Youtube
  • Facebook
  • Instagram
  • LinkedIn
  • Tumblr
  • Pinterest
  • Twitter
  • mastodon

Tags

Active Directory AWS Azure Bitlocker Microsoft Windows PowerShell WDS Windows 10 Windows 11 Windows Server 2016

Copyright © 2025 TechDirectArchive

 

Loading Comments...
 

You must be logged in to post a comment.