Facebook Twitter Instagram
    TecAdmin
    • Home
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    You are at:Home»Windows Tutorials»Which Process is Listening on a Port in Windows

    Which Process is Listening on a Port in Windows

    By RahulJune 3, 20222 Mins Read

    How do I find, which process is listening on a specific port on the Windows operating system?

    Advertisement

    This article will help you to find the process name listening on a specific port on a Windows system. Sometimes you may have faced issues like “port in use” during application installation.

    You can choose one of the below given 2 methods. The first method uses netstat to find the PID of the process listening on a specific port, then use tasklist to find the process name by the PID.

    Method 1. Using Default Command Prompt

    Use the following command to find out the process id (PID) listening on port 80. You can change this port to search for another port.

    netstat -aon | findstr ":80" | findstr "LISTENING" 
    
    Output:
    TCP 0.0.0.0:80 0.0.0.0:0 LISTENING 4 TCP [::]:80 [::]:0 LISTENING 4

    The last column of the output shows the PID of the processes. The above output shows the PID is 4 for the process listening on port 80.

    Use this process id with the task list command to find the process name.

    tasklist /fi "pid eq 4" 
    

    You will see the process name in the results.

    Which Process is Listening on a Port in Windows
    Finding the process listening on specific port in Windows

    Method 2. Using Get-Process in PowerShell

    The second method uses the PowerShell command to find out the process running on a specific port on Windows.

    Launch the PowerShell terminal and execute the following command to find the process name running on port 80. You can change the port number to check for other ports.

    Get-Process -Id (Get-NetTCPConnection -LocalPort 80).OwningProcess 
    

    You will see the process name in the results.

    How to Check Process Name by Port in PowerShell
    Checking the process name running on specific port

    Conclusion

    In this tutorial, you have learned two methods to find process name listening on a specific port on a Windows system.

    command-line port PowerShell process windows
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp

    Related Posts

    4 Methods to Check .NET Framework Version on Windows

    Generate the SSH Key Pair on Windows {5 Steps}

    How to Open Port in Linux

    View 1 Comment

    1 Comment

    1. Devid A on January 1, 2022 11:25 am

      Thanks for sharing informative content!

      Reply

    Leave A Reply Cancel Reply

    Advertisement
    Recent Posts
    • How to Install PHP 8.2-7.4 on RHEL & CentOS Stream 9
    • How to Install MySQL 8.0 on RHEL & CentOS Stream 9
    • How to Split Large Archives in Linux using the Command Line
    • System.out.println() Method in Java: A Beginner’s Guide
    • Split Command in Linux With Examples (Split Large Files)
    Facebook Twitter Instagram Pinterest
    © 2023 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.