{"id":2602,"date":"2017-06-20T05:29:08","date_gmt":"2017-06-20T05:29:08","guid":{"rendered":"https:\/\/www.testingdocs.com\/questions\/?p=2602"},"modified":"2025-03-12T03:14:21","modified_gmt":"2025-03-12T03:14:21","slug":"how-to-find-listening-ports-on-windows","status":"publish","type":"post","link":"https:\/\/www.testingdocs.com\/questions\/how-to-find-listening-ports-on-windows\/","title":{"rendered":"How to find listening Ports on Windows"},"content":{"rendered":"<h1>How to find listening Ports on Windows<\/h1>\n<p>NETSTAT command is used to display network protocol statistics and the TCP\/IP network connections. The command has various command-line switches. -a option displays the listening ports on the Windows machine.<\/p>\n<h3>NETSTAT command<\/h3>\n<p>The most useful command-line flags are the -a and -b<\/p>\n<p>-a displays the listening ports<\/p>\n<p>-b option displays the application that runs on the port. This option requires elevation. We need to open the command shell using Admin privileges.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2606\" src=\"https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/NETSTAT-Windows-Command.png\" alt=\"Netstat windows command\" width=\"1920\" height=\"1015\" title=\"\" srcset=\"https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/NETSTAT-Windows-Command.png 1920w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/NETSTAT-Windows-Command-300x159.png 300w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/NETSTAT-Windows-Command-1024x541.png 1024w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/NETSTAT-Windows-Command-768x406.png 768w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/NETSTAT-Windows-Command-1536x812.png 1536w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><\/p>\n<h2>\u00a0<code class=\"\" data-line=\"\">netstat<\/code> Command Flags<\/h2>\n<table>\n<tbody>\n<tr>\n<th>Command<\/th>\n<th>Description<\/th>\n<\/tr>\n<tr>\n<td><code class=\"\" data-line=\"\">netstat<\/code><\/td>\n<td>Displays active connections.<\/td>\n<\/tr>\n<tr>\n<td><code class=\"\" data-line=\"\">netstat -a<\/code><\/td>\n<td>Shows all active connections and listening ports.<\/td>\n<\/tr>\n<tr>\n<td><code class=\"\" data-line=\"\">netstat -n<\/code><\/td>\n<td>Displays addresses and port numbers in numerical form.<\/td>\n<\/tr>\n<tr>\n<td><code class=\"\" data-line=\"\">netstat -o<\/code><\/td>\n<td>Shows active connections along with the Process ID (PID).<\/td>\n<\/tr>\n<tr>\n<td><code class=\"\" data-line=\"\">netstat -p [protocol]<\/code><\/td>\n<td>Displays connections for a specific protocol (TCP, UDP, etc.).<\/td>\n<\/tr>\n<tr>\n<td><code class=\"\" data-line=\"\">netstat -r<\/code><\/td>\n<td>Displays the routing table.<\/td>\n<\/tr>\n<tr>\n<td><code class=\"\" data-line=\"\">netstat -s<\/code><\/td>\n<td>Shows network statistics by protocol.<\/td>\n<\/tr>\n<tr>\n<td><code class=\"\" data-line=\"\">netstat -b<\/code><\/td>\n<td>Displays the executable responsible for each connection.<\/td>\n<\/tr>\n<tr>\n<td><code class=\"\" data-line=\"\">netstat -an<\/code><\/td>\n<td>Shows all connections in numerical format.<\/td>\n<\/tr>\n<tr>\n<td><code class=\"\" data-line=\"\">netstat -ano<\/code><\/td>\n<td>Shows all connections with numerical addresses and PIDs.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Examples<\/h2>\n<p>To know which process listens on a particular port using the -b option. For example,<\/p>\n<p><strong>\/&gt; netstat -ab<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2607\" src=\"https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/LIstening-Ports-On-Windows-Machine.png\" alt=\"Listening Ports On Windows Machine\" width=\"1920\" height=\"645\" title=\"\" srcset=\"https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/LIstening-Ports-On-Windows-Machine.png 1920w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/LIstening-Ports-On-Windows-Machine-300x101.png 300w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/LIstening-Ports-On-Windows-Machine-1024x344.png 1024w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/LIstening-Ports-On-Windows-Machine-768x258.png 768w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/LIstening-Ports-On-Windows-Machine-1536x516.png 1536w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to find listening Ports on Windows NETSTAT command is used to display network protocol statistics and the TCP\/IP network connections. The command has various command-line switches. -a option displays the listening ports on the Windows machine. NETSTAT command The most useful command-line flags are the -a and -b -a displays the listening ports -b [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25],"tags":[],"class_list":["post-2602","post","type-post","status-publish","format-standard","hentry","category-windows","has-post-title","has-post-date","has-post-category","has-post-tag","has-post-comment","has-post-author",""],"_links":{"self":[{"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/posts\/2602","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/comments?post=2602"}],"version-history":[{"count":6,"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/posts\/2602\/revisions"}],"predecessor-version":[{"id":27058,"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/posts\/2602\/revisions\/27058"}],"wp:attachment":[{"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/media?parent=2602"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/categories?post=2602"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/tags?post=2602"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}