{"id":6618,"date":"2025-01-24T04:03:19","date_gmt":"2025-01-23T22:33:19","guid":{"rendered":"https:\/\/www.veeble.com\/kb\/?p=6618"},"modified":"2025-04-01T12:39:07","modified_gmt":"2025-04-01T07:09:07","slug":"how-to-find-the-process-which-uses-the-port-in-linux-and-windows","status":"publish","type":"post","link":"https:\/\/www.veeble.com\/kb\/how-to-find-the-process-which-uses-the-port-in-linux-and-windows\/","title":{"rendered":"How to find the process using port in Linux and Windows?"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2025\/01\/find-port-1.png\"><img fetchpriority=\"high\" decoding=\"async\" width=\"3781\" height=\"801\" src=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2025\/01\/find-port-1.png\" alt=\"How to Find the Process Which Uses the Port in Linux and Windows?\" class=\"wp-image-6632\" srcset=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2025\/01\/find-port-1.png 3781w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2025\/01\/find-port-1-300x64.png 300w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2025\/01\/find-port-1-1024x217.png 1024w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2025\/01\/find-port-1-768x163.png 768w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2025\/01\/find-port-1-1536x325.png 1536w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2025\/01\/find-port-1-2048x434.png 2048w\" sizes=\"(max-width: 3781px) 100vw, 3781px\" \/><\/a><\/figure>\n\n\n\n<p>If you&#8217;ve faced a blocked or in-use port, it can be frustrating. Fortunately, there are easy ways for <strong>Windows<\/strong> and <strong>Linux<\/strong> users to find which program or process is using a port and resolve conflicts.<\/p>\n\n\n\n<p>In this guide, we&#8217;ll walk you through how to find the program or process that&#8217;s using a particular port on both Windows and Linux systems, and I&#8217;ll also show you the tools available to resolve port conflicts.<\/p>\n\n\n\n<div class=\"wp-block-group is-layout-constrained wp-container-core-group-is-layout-639b5052 wp-block-group-is-layout-constrained\" style=\"padding-top:0;padding-right:0;padding-bottom:0;padding-left:0\"><h6 class=\"wp-block-heading\" id=\"why-knowing-which-process-uses-a-port-is-important\">Why Knowing Which Process Uses a Port is Important?<\/h6>\n\n\n<p>Ports are essential for network communication, and multiple programs might attempt to use the same port, leading to conflicts. By finding which process is using a specific port, you can avoid these conflicts, ensure smooth network operations, and troubleshoot issues that arise from port usage.<\/p>\n<\/div>\n\n\n\n<p><\/p>\n\n\n<h3 class=\"wp-block-heading\" id=\"method-1-using-command-prompt-windows\">Method 1: Using Command Prompt (Windows)<\/h3>\n\n\n<p>The Netstat utility on Windows can help you find which application is using a specific port. Here&#8217;s how you can use this method to track down which process is occupying a particular port:<\/p>\n\n\n\n<p>Press the Windows key, type CMD in the search box, right-click on Command Prompt, and select Run as Administrator. Then enter the command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>netstat -aon -p tcp<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2025\/01\/5AADCC97-9747-452D-8D61-BBB6A91D6FFA.png\"><img decoding=\"async\" width=\"1548\" height=\"330\" src=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2025\/01\/5AADCC97-9747-452D-8D61-BBB6A91D6FFA.png\" alt=\"\" class=\"wp-image-6664\" srcset=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2025\/01\/5AADCC97-9747-452D-8D61-BBB6A91D6FFA.png 1548w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2025\/01\/5AADCC97-9747-452D-8D61-BBB6A91D6FFA-300x64.png 300w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2025\/01\/5AADCC97-9747-452D-8D61-BBB6A91D6FFA-1024x218.png 1024w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2025\/01\/5AADCC97-9747-452D-8D61-BBB6A91D6FFA-768x164.png 768w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2025\/01\/5AADCC97-9747-452D-8D61-BBB6A91D6FFA-1536x327.png 1536w\" sizes=\"(max-width: 1548px) 100vw, 1548px\" \/><\/a><\/figure>\n\n\n\n<p>This command will display a list of all TCP connections, their local addresses, the process IDs (PIDs), and the state of each connection.<\/p>\n\n\n\n<p>Look through the list for the port you&#8217;re concerned about (e.g., port 135 in the above screenshot).<br>Find the PID number associated with that port in the last column. i.e; 1436 there.<\/p>\n\n\n\n<p>To match the PID with the program name, use the following command in the same Command Prompt window:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>tasklist | find \"PID_number\"<\/code><\/pre>\n\n\n\n<p>For example, if the PID number from the previous command was 1400, you would run: <em><strong>tasklist | find &#8220;1436&#8221;<\/strong><\/em><\/p>\n\n\n\n<p>This will show you the name of the application using that port (e.g., FileZilla Server, SQL Server, etc.).<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2025\/01\/80CE8095-EE18-43A0-A06E-B9FCB48317A5.png\"><img decoding=\"async\" width=\"1296\" height=\"117\" src=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2025\/01\/80CE8095-EE18-43A0-A06E-B9FCB48317A5.png\" alt=\"&quot;tasklist | find &quot;PID_number&quot; command find the process which uses the port via Windows command prompt\" class=\"wp-image-6641\" srcset=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2025\/01\/80CE8095-EE18-43A0-A06E-B9FCB48317A5.png 1296w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2025\/01\/80CE8095-EE18-43A0-A06E-B9FCB48317A5-300x27.png 300w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2025\/01\/80CE8095-EE18-43A0-A06E-B9FCB48317A5-1024x92.png 1024w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2025\/01\/80CE8095-EE18-43A0-A06E-B9FCB48317A5-768x69.png 768w\" sizes=\"(max-width: 1296px) 100vw, 1296px\" \/><\/a><\/figure>\n\n\n\n<p><\/p>\n\n\n<h3 class=\"wp-block-heading\" id=\"method-2-using-resource-monitor-windows\">Method 2: Using Resource Monitor (Windows)<\/h3>\n\n\n<p>If you prefer a more visual approach, Windows&#8217; <a href=\"https:\/\/en.wikipedia.org\/wiki\/Resource_Monitor\" target=\"_blank\" rel=\"noopener\">Resource Monitor tool<\/a> can provide a detailed view of the programs using specific ports.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Press the Windows key and type <strong>resource monitor<\/strong> or <strong>resmon<\/strong> in the search box. Click on Resource Monitor to open the tool.<\/li>\n\n\n\n<li>In Resource Monitor, navigate to the Network tab.<\/li>\n<\/ol>\n\n\n\n<p>In the Listening Ports section, you\u2019ll see a list of all open ports and the applications that are using them.<br>You can check the PID column to match the process IDs with the applications.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2025\/01\/20250123_195914.gif\"><img loading=\"lazy\" decoding=\"async\" width=\"1920\" height=\"782\" src=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2025\/01\/20250123_195914.gif\" alt=\"Use resource monitor application in windows to find out the program using the port\" class=\"wp-image-6646\"\/><\/a><\/figure>\n\n\n\n<p><\/p>\n\n\n<h3 class=\"wp-block-heading\" id=\"method-3-command-line-on-linux\">Method 3: Command Line on Linux<\/h3>\n\n\n<p>If you\u2019re using Linux, the process is quite similar, but instead of Command Prompt, you\u2019ll use the Terminal to run the necessary commands.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Open a terminal on your Linux machine.<\/li>\n\n\n\n<li>Enter the following NetStat command to get a list of active connections:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo netstat -ano -p tcp<\/code><\/pre>\n\n\n\n<p>This will show all TCP connections with their corresponding PIDs.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2025\/01\/ED0C202E-24A3-41AE-AE73-3055AE0701F7.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"1196\" height=\"164\" src=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2025\/01\/ED0C202E-24A3-41AE-AE73-3055AE0701F7.jpg\" alt=\"command: &quot;netstat -ano -p tcp&quot; executed to find out the process using the port in Linux terminal.\" class=\"wp-image-6650\" srcset=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2025\/01\/ED0C202E-24A3-41AE-AE73-3055AE0701F7.jpg 1196w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2025\/01\/ED0C202E-24A3-41AE-AE73-3055AE0701F7-300x41.jpg 300w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2025\/01\/ED0C202E-24A3-41AE-AE73-3055AE0701F7-1024x140.jpg 1024w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2025\/01\/ED0C202E-24A3-41AE-AE73-3055AE0701F7-768x105.jpg 768w\" sizes=\"(max-width: 1196px) 100vw, 1196px\" \/><\/a><\/figure>\n\n\n\n<p>Similar to Windows, locate the specific port number and note the associated PID.<\/p>\n\n\n\n<p>Once you have the PID, you can use the following command to find more details about the process:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ps -ef | grep<\/code><\/pre>\n\n\n\n<p>This will display the program name and other details related to the process ID.<\/p>\n\n\n\n<p><\/p>\n\n\n<h3 class=\"wp-block-heading\" id=\"additional-tips\">Additional Tips:<\/h3>\n\n<h6 class=\"wp-block-heading\" id=\"how-to-interpret-the-netstat-command\">How to Interpret the netstat Command:<\/h6>\n\n\n<p>You can customize the <a href=\"https:\/\/man7.org\/linux\/man-pages\/man8\/netstat.8.html\" target=\"_blank\" rel=\"noopener\">netstat<\/a> command with different flags to refine the results:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>-a<\/td><td>Displays all active connections and listening ports.<\/td><\/tr><tr><td>-n<\/td><td>Shows addresses and port numbers in numerical form (instead of resolving them to hostnames).<\/td><\/tr><tr><td>-o<\/td><td>Displays the PID associated with each connection.<\/td><\/tr><tr><td>-p<\/td><td>Displays the protocol (TCP, UDP, etc.).<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><\/p>\n\n\n<h6 class=\"wp-block-heading\" id=\"task-manager-pid-column\">Task Manager PID Column:<\/h6>\n\n\n<p>If you&#8217;re using Windows Task Manager to match a PID, ensure the PID column is visible. To do this, click on the View menu, select Select Columns, and check the box for PID (Process Identifier).<\/p>\n\n\n\n<div class=\"wp-block-uagb-separator uagb-block-5e248bf0\"><div class=\"wp-block-uagb-separator__inner\" style=\"--my-background-image:\"><\/div><\/div>\n\n\n\n<p>Knowing which application is using a port is essential for troubleshooting network and application conflicts. By following the methods above, you can easily find which program or process is using a particular port on both Windows and Linux systems. Whether you prefer using the command line or a graphical interface, there are plenty of ways to resolve port conflicts efficiently.<\/p>\n\n\n\n<div style=\"height:25px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-uagb-call-to-action uagb-block-fee3c479 wp-block-button\"><div class=\"uagb-cta__wrap\"><h3 class=\"uagb-cta__title\">Take Control with cPanel<\/h3><p class=\"uagb-cta__desc\">Manage every aspect of your website with our intuitive cPanel. From email setup to file management, enjoy complete control. Experience reliable hosting with robust features.<\/p><\/div><div class=\"uagb-cta__buttons\"><a href=\"https:\/\/www.veeble.com\/in\/cpanel-hosting\/\" class=\"uagb-cta__button-link-wrapper wp-block-button__link\" target=\"_blank\" rel=\"noopener noreferrer\">Explore cPanel Plans<svg xmlns=\"https:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\"><path d=\"M504.3 273.6l-112.1 104c-6.992 6.484-17.18 8.218-25.94 4.406c-8.758-3.812-14.42-12.45-14.42-21.1L351.9 288H32C14.33 288 .0002 273.7 .0002 255.1S14.33 224 32 224h319.9l0-72c0-9.547 5.66-18.19 14.42-22c8.754-3.809 18.95-2.075 25.94 4.41l112.1 104C514.6 247.9 514.6 264.1 504.3 273.6z\"><\/path><\/svg><\/a><\/div><\/div>\n\n\n\n<div style=\"height:25px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>Related Blogs:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-veeble-hosting wp-block-embed-veeble-hosting\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"800zMWERcX\"><a href=\"https:\/\/www.veeble.com\/kb\/how-to-open-a-specific-port-on-linux\/\">How to Open a Specific Port on Linux<\/a><\/blockquote><iframe class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8220;How to Open a Specific Port on Linux&#8221; &#8212; Veeble Hosting\" src=\"https:\/\/www.veeble.com\/kb\/how-to-open-a-specific-port-on-linux\/embed\/#?secret=ah5N98frQR#?secret=800zMWERcX\" data-secret=\"800zMWERcX\" width=\"500\" height=\"282\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-veeble-hosting wp-block-embed-veeble-hosting\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"WVkXAWXk3k\"><a href=\"https:\/\/www.veeble.com\/kb\/how-to-close-a-specific-port-on-linux\/\">How to Close a Specific Port on Linux<\/a><\/blockquote><iframe class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8220;How to Close a Specific Port on Linux&#8221; &#8212; Veeble Hosting\" src=\"https:\/\/www.veeble.com\/kb\/how-to-close-a-specific-port-on-linux\/embed\/#?secret=kuTToHZn7F#?secret=WVkXAWXk3k\" data-secret=\"WVkXAWXk3k\" width=\"500\" height=\"282\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Learn how to identify which program is using or blocking a port on your Linux or Windows system with this tutorial.<\/p>\n","protected":false},"author":7,"featured_media":8410,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[1,5,16],"tags":[],"class_list":["post-6618","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","category-linux","category-windows"],"uagb_featured_image_src":{"full":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2025\/01\/How-to-find-the-process-using-port-in-Linux-and-Windows-2.jpg",1536,1024,false],"thumbnail":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2025\/01\/How-to-find-the-process-using-port-in-Linux-and-Windows-2-150x150.jpg",150,150,true],"medium":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2025\/01\/How-to-find-the-process-using-port-in-Linux-and-Windows-2-300x200.jpg",300,200,true],"medium_large":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2025\/01\/How-to-find-the-process-using-port-in-Linux-and-Windows-2-768x512.jpg",768,512,true],"large":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2025\/01\/How-to-find-the-process-using-port-in-Linux-and-Windows-2-1024x683.jpg",1024,683,true],"1536x1536":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2025\/01\/How-to-find-the-process-using-port-in-Linux-and-Windows-2.jpg",1536,1024,false],"2048x2048":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2025\/01\/How-to-find-the-process-using-port-in-Linux-and-Windows-2.jpg",1536,1024,false]},"uagb_author_info":{"display_name":"Adrian Antony","author_link":"https:\/\/www.veeble.com\/kb\/author\/adrian\/"},"uagb_comment_info":0,"uagb_excerpt":"Learn how to identify which program is using or blocking a port on your Linux or Windows system with this tutorial.","_links":{"self":[{"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/posts\/6618","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/comments?post=6618"}],"version-history":[{"count":36,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/posts\/6618\/revisions"}],"predecessor-version":[{"id":8242,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/posts\/6618\/revisions\/8242"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/media\/8410"}],"wp:attachment":[{"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/media?parent=6618"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/categories?post=6618"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/tags?post=6618"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}