{"id":7549,"date":"2025-07-14T00:49:01","date_gmt":"2025-07-13T21:49:01","guid":{"rendered":"https:\/\/incirbilisim.com\/blog\/2025\/07\/14\/ip-adresi-ve-port-icin-pid-bulma-2\/"},"modified":"2025-07-14T01:17:13","modified_gmt":"2025-07-13T22:17:13","slug":"find-pid-listening-on-an-ip-address-and-port","status":"publish","type":"post","link":"https:\/\/incirbilisim.com\/blog\/en\/find-pid-listening-on-an-ip-address-and-port\/","title":{"rendered":"Find PID Listening on an IP Address and Port"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Find PID Listening on an IP Address and Port<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">On Linux, you can use the <code>netstat<\/code> command to discover which process (and its PID) is listening on a specific IP address and port. Follow the steps below.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1. Basic Command<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo netstat -tunlp | grep &lt;IP_ADDRESS&gt;<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Replace <code>&lt;IP_ADDRESS><\/code> with the actual IP you want to check. For example: <code>grep 192.168.1.10<\/code><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">2. Command Options<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>-t<\/code>: Show only <strong>TCP<\/strong> connections<\/li>\n\n\n\n<li><code>-u<\/code>: Show only <strong>UDP<\/strong> connections<\/li>\n\n\n\n<li><code>-n<\/code>: Display addresses and ports <strong>numerically<\/strong> without name resolution<\/li>\n\n\n\n<li><code>-l<\/code>: Show only <strong>listening<\/strong> sockets<\/li>\n\n\n\n<li><code>-p<\/code>: Show the <strong>PID\/Program name<\/strong> using each socket<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">3. Example Output<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>tcp   0   0   192.168.1.10:34001   0.0.0.0:*   LISTEN   2759984\/nginx<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Field<\/th><th>Meaning<\/th><\/tr><\/thead><tbody><tr><td><code>tcp<\/code><\/td><td>Protocol (TCP)<\/td><\/tr><tr><td><code>192.168.1.10:34001<\/code><\/td><td>Local IP and port<\/td><\/tr><tr><td><code>LISTEN<\/code><\/td><td>Socket state<\/td><\/tr><tr><td><code>2759984\/nginx<\/code><\/td><td><strong>PID<\/strong>=2759984, process name=nginx<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">4. Terminate the Discovered PID<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo kill 2759984<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">For a forceful kill (SIGKILL):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo kill -9 2759984<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">5. Alternative: <code>ss<\/code> Command<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The <code>ss<\/code> tool is faster and provides similar information:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo ss -tunlp | grep 192.168.1.10<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">In summary, these commands help you quickly identify which process is listening on a given IP address and port, and allow you to terminate it if needed.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"tmnf_excerpt\"><p>Find PID Listening on an IP Address and Port On Linux, you can use the netstat command to discover which process (and its PID) is listening on a specific IP address and port. Follow the steps below. 1. Basic Command 2. Command Options 3. Example Output Field Meaning tcp Protocol (TCP) 192.168.1.10:34001 Local IP and &hellip;<\/p>\n<\/div>","protected":false},"author":1,"featured_media":7546,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"slim_seo":{"title":"Find PID Listening on an IP Address and Port - Incir Bili\u015fim | It&#039;ler i\u00e7in notlar","description":"Find PID Listening on an IP Address and Port On Linux, you can use the netstat command to discover which process (and its PID) is listening on a specific IP add"},"footnotes":""},"categories":[42,43],"tags":[44,45,46,47],"class_list":["post-7549","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux-en","category-server-management-en","tag-linux-en","tag-netstat-en","tag-pid-en","tag-ss-en"],"_links":{"self":[{"href":"https:\/\/incirbilisim.com\/blog\/en\/wp-json\/wp\/v2\/posts\/7549","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/incirbilisim.com\/blog\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/incirbilisim.com\/blog\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/incirbilisim.com\/blog\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/incirbilisim.com\/blog\/en\/wp-json\/wp\/v2\/comments?post=7549"}],"version-history":[{"count":1,"href":"https:\/\/incirbilisim.com\/blog\/en\/wp-json\/wp\/v2\/posts\/7549\/revisions"}],"predecessor-version":[{"id":7551,"href":"https:\/\/incirbilisim.com\/blog\/en\/wp-json\/wp\/v2\/posts\/7549\/revisions\/7551"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/incirbilisim.com\/blog\/en\/wp-json\/wp\/v2\/media\/7546"}],"wp:attachment":[{"href":"https:\/\/incirbilisim.com\/blog\/en\/wp-json\/wp\/v2\/media?parent=7549"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/incirbilisim.com\/blog\/en\/wp-json\/wp\/v2\/categories?post=7549"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/incirbilisim.com\/blog\/en\/wp-json\/wp\/v2\/tags?post=7549"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}