{"id":534110,"date":"2023-01-03T02:09:33","date_gmt":"2023-01-02T23:09:33","guid":{"rendered":"https:\/\/en.buradabiliyorum.com\/how-to-find-your-ip-address-from-cmd-command-prompt\/"},"modified":"2023-01-03T02:09:33","modified_gmt":"2023-01-02T23:09:33","slug":"how-to-find-your-ip-address-from-cmd-command-prompt","status":"publish","type":"post","link":"https:\/\/buradabiliyorum.com\/en\/how-to-find-your-ip-address-from-cmd-command-prompt\/","title":{"rendered":"#How to Find Your IP Address From CMD (Command Prompt)"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_84 counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-6a2e0fcaa8fdb\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #dd3333;color:#dd3333\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #dd3333;color:#dd3333\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6a2e0fcaa8fdb\" checked aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-find-your-ip-address-from-cmd-command-prompt\/#%E2%80%9CHow_to_Find_Your_IP_Address_From_CMD_Command_Prompt%E2%80%9D\" >&#8220;How to Find Your IP Address From CMD (Command Prompt)&#8221;<\/a><ul class='ez-toc-list-level-2' ><li class='ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-find-your-ip-address-from-cmd-command-prompt\/#Which_IP_Do_You_Want_Local_Private_IP_vs_External_Public_IP\" >Which IP Do You Want? Local (Private) IP vs External (Public) IP<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-find-your-ip-address-from-cmd-command-prompt\/#Get_Local_Private_IP_address_from_CMD_Command_Prompt\" >Get Local (Private) IP address from CMD (Command Prompt)<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-find-your-ip-address-from-cmd-command-prompt\/#Get_Public_External_IP_address_from_CMD_Command_Prompt\" >Get Public (External) IP address from CMD (Command Prompt)<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-find-your-ip-address-from-cmd-command-prompt\/#Get_Public_IP_Address_from_Powershell\" >Get Public IP Address from Powershell<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-find-your-ip-address-from-cmd-command-prompt\/#Get_Public_IP_Address_from_the_Bash_Shell\" >Get Public IP Address from the Bash Shell<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h1><span class=\"ez-toc-section\" id=\"%E2%80%9CHow_to_Find_Your_IP_Address_From_CMD_Command_Prompt%E2%80%9D\"><\/span>&#8220;How to Find Your IP Address From CMD (Command Prompt)&#8221;<span class=\"ez-toc-section-end\"><\/span><\/h1>\n<div>\n<img loading=\"lazy\" decoding=\"async\" class=\"type:primaryImage alignnone size-full wp-image-858343\" data-pagespeed-no-defer=\"\" src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2023\/01\/Snag_346f47.png?width=1198&amp;trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"\" width=\"1212\" height=\"696\"\/><\/p>\n<div class=\"keytakeaways\">\n<ol>\n<li>To find your local IP address from the CMD Command prompt, simply type &#8220;ipconfig&#8221; into the prompt. It will be listed as &#8220;IPv4 Address&#8221;.<\/li>\n<li>To find your public (external) IP address from a command prompt, type &#8220;curl ifconfig.me&#8221; on Windows 10 or 11.<\/li>\n<\/ol>\n<\/div>\n<p>Like most things in Windows there are dozens of ways to get something done, so today we\u2019re showing you multiple different techniques to find your public or private IP address from the command prompt.<\/p>\n<p>Why would you want to get your IP address from the command line when you can easily look it up in the GUI in Windows 10 or Windows 11? If you\u2019re an old-school kind of geek, using the command line to do things comes naturally, so you might find it easier to type in a quick command instead of clicking a whole bunch of settings. The real reason, though, is that you\u2019re probably going to automate it in a <a href=\"https:\/\/buradabiliyorum.com\/en\/category\/download-scripts-themes-apps\/\" data-internallinksmanager029f6b8e52c=\"9\" title=\"Download Scripts &amp; Themes &amp; Apps\" target=\"_blank\" rel=\"noopener\">script<\/a>, and you just need to figure out the right command for the job.<\/p>\n<h2 role=\"heading\" aria-level=\"2\"><span class=\"ez-toc-section\" id=\"Which_IP_Do_You_Want_Local_Private_IP_vs_External_Public_IP\"><\/span>Which IP Do You Want? Local (Private) IP vs External (Public) IP<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Before we show you how to find your IP address we need to talk about the <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/www.howtogeek.com\/117371\/how-to-find-your-computers-private-public-ip-addresses\/\">difference between public and private IP addresses.<\/p>\n<p>Each network that you\u2019re connected to will have an IP address associated with it\u2014if your computer is connected via Wi-Fi as well as Ethernet, both of the adapters will have their own IP addresses, and your local TCP\/IP routing table is responsible for figuring out which one ends up getting used for which requests. Most of the time, though, you\u2019re just connected to your Wi-Fi router, so your local computer connecting to your local network has a single IP address.<\/p>\n<p><img decoding=\"async\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2012\/06\/image334.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>Your internet router, however, is always connected to two separate networks: your local (private) network in your house, and the external (public) network of your ISP. The router translates the request from your computer using NAT (Network Address Translation) to allow everything in your network to share a single public IP address.<\/p>\n<p>When your Windows PC, iPhone, or Raspberry Pi connect to the internet from your house, the server that they connect to will see them as the same IP address: the external (public) IP on your router.<\/p>\n<h2 role=\"heading\" aria-level=\"2\"><span class=\"ez-toc-section\" id=\"Get_Local_Private_IP_address_from_CMD_Command_Prompt\"><\/span>Get Local (Private) IP address from CMD (Command Prompt)<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>To find your local or private IP address from the command prompt in any version of Windows, simply open up the Start Menu, search for the Command Prompt, open it up, and type the following command:<\/p>\n<pre>ipconfig<\/pre>\n<p>Windows will output a lot of details, but the line you\u2019re looking for is the one that says \u201cIPv4 Address\u201d which will display your local \/ private IP address for the adapter that is connected to your <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/www.howtogeek.com\/797523\/best-wi-fi-6e-router\/\">Wi-Fi or Ethernet network.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-858336\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2023\/01\/Snag_1087fe.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"ipconfig for local ip address\" width=\"1116\" height=\"546\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>Some people will have more than one adapter in the list, and if you\u2019ve got Virtual machine software installed or WSL you might see a lot of extra stuff, so you\u2019ll need to check for the adapter that\u2019s connected to the network you\u2019re trying to find the address for.<\/p>\n<p>Keep in mind this is your private IP address, not the public address that websites will see your traffic coming from. For your public IP address, keep reading.<\/p>\n<h2 role=\"heading\" aria-level=\"2\"><span class=\"ez-toc-section\" id=\"Get_Public_External_IP_address_from_CMD_Command_Prompt\"><\/span>Get Public (External) IP address from CMD (Command Prompt)<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>To find your public \/ external IP address from the command prompt, you have a lot of different options, but perhaps the easiest one is to simply type the following command (assuming you\u2019ve already opened Command Prompt from the Start Menu)<\/p>\n<pre>curl ifconfig.me<\/pre>\n<p>This command will instantly output your current public IP address right there on the command line. It works by using the <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/www.howtogeek.com\/447033\/how-to-use-curl-to-download-files-from-the-linux-command-line\/\">curl command to download the contents of ifconfig.me, which is a very simple website that somebody set up to output nothing but your public IP address. If you plug that domain name into your browser, you\u2019ll see the same thing.<\/p>\n<p>It\u2019s worth noting that Windows 10 and 11 have the curl command built right in, but if you\u2019re using an earlier version of Windows you probably will need to download a copy of <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/curl.se\/\">curl for Windows<\/a>. Curl should work from within the regular Windows CMD prompt, but you can also use it from within the Bash shell inside of Windows 10 or 11 as well.<\/p>\n<p>There are also a number of alternative methods for pulling up your public IP address from the command prompt, and we\u2019ll include those for completeness\u2014and just in case the first one stops working! Here are a few:<\/p>\n<pre>curl myexternalip.com\/raw<\/pre>\n<pre>curl ipecho.net\/plain<\/pre>\n<pre>curl ifcfg.me<\/pre>\n<pre>curl icanhazip.com<\/pre>\n<p>That last one weirdly includes an extra line break, which might not work very well if you\u2019re using this in a script.<\/p>\n<p>Perhaps my favorite method uses OpenDNS and the trusty nslookup command that\u2019s been on every version of Windows since forever:<\/p>\n<pre>nslookup myip.opendns.com. resolver1.opendns.com<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-858340\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2023\/01\/Snag_23599f.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"nslookup for ip address\" width=\"1067\" height=\"416\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>Now that you\u2019ve had tons of fun reading about how to do all this from the command prompt I should probably point out that you can also just type \u201cwhat is my ip\u201d into Google and it\u2019ll tell you. But it\u2019s just not as much fun that way.<\/p>\n<p>Want to get more complicated? Did you know that you can actually change your IP address from the command prompt? You can also edit the Windows Registry, lock your PC, change a password, start Excel or Word, map network drives, shut down your PC, uninstall programs, compare files, find files, locate your Windows product key, and even use all sorts of keyboard shortcuts from the old-school Windows command prompt.<\/p>\n<h2 role=\"heading\" aria-level=\"2\"><span class=\"ez-toc-section\" id=\"Get_Public_IP_Address_from_Powershell\"><\/span>Get Public IP Address from Powershell<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>If you\u2019re ready to really have fun, here\u2019s how to find your public IP address from a <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/www.howtogeek.com\/163127\/how-powershell-differs-from-the-windows-command-prompt\/\">more powerful PowerShell prompt (or script, for that matter). Just type this into your PowerShell terminal:<\/p>\n<pre>(Invoke-WebRequest -UseBasicParsing -URI ifconfig.me ).Content<\/pre>\n<p>It\u2019ll instantly return your IP address just like all the other examples above. You can also split it out into multiple lines if you\u2019re going to be using it in a script:<\/p>\n<pre>$myip = Invoke-WebRequest -UseBasicParsing -URI ifconfig.me&#13;\n$myip.Content<\/pre>\n<p>This will create the <code>$myip<\/code> variable and put the contents of the request into it, and then you can use <code>$myip.Content<\/code> to spit out the value or use it elsewhere in a script if you need to. You can replace the ifconfig.me site with any of the other examples that we showed you earlier, just in case that site isn\u2019t working at some point in the future.<\/p>\n<h2 role=\"heading\" aria-level=\"2\"><span class=\"ez-toc-section\" id=\"Get_Public_IP_Address_from_the_Bash_Shell\"><\/span>Get Public IP Address from the Bash Shell<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>If you\u2019re using the <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/www.howtogeek.com\/249966\/how-to-install-and-use-the-linux-bash-shell-on-windows-10\/\">Bash shell from within Windows, you\u2019ll probably be happy to know that getting your public IP address is just as simple as from the command prompt. Just type the following command:<\/p>\n<pre>curl ifconfig.me<\/pre>\n<p>It should work exactly the same way as the command did in the regular CMD prompt, but you can do so much more with the Bash shell than the command prompt.<\/p>\n<p>Ready to find more IP address information? You can find your IP address using the GUI in Windows 10 or Windows 11, or look up the IP of your iPhone, Roku, printer, your Wi-Fi router, or any other device. Once you\u2019re an expert, you can graduate to seeing what is listening on TCP\/IP ports and setting up static IP routes.<\/p>\n<\/div>\n<p><script>\n setTimeout(function(){\n  !function(f,b,e,v,n,t,s)\n  {if(f.fbq)return;n=f.fbq=function(){n.callMethod?\n  n.callMethod.apply(n,arguments):n.queue.push(arguments)};\n  if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';\n  n.queue=[];t=b.createElement(e);t.async=!0;\n  t.src=v;s=b.getElementsByTagName(e)[0];\n  s.parentNode.insertBefore(t,s) } (window, document,'script',\n  'https:\/\/connect.facebook.net\/en_US\/fbevents.js');\n   fbq('init', '335401813750447');\n   fbq('track', 'PageView');\n  },3000);\n<\/script><\/p>\n<blockquote><p><strong><span style=\"color: #ff6600;\">If you liked the article, do not forget to share it with your friends. Follow us on\u00a0<span style=\"color: #ff0000;\"><a style=\"color: #ff0000;\" href=\"https:\/\/news.google.com\/publications\/CAAqBwgKMLG0nwswvr63Aw\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Google News<\/a><\/span>\u00a0too, click on the star and choose us from your favorites.<\/span><\/strong><\/p><\/blockquote>\n<blockquote>\n<p style=\"text-align: center;\">For forums sites go to <span style=\"color: #ff9900;\"><a style=\"color: #ff9900;\" href=\"https:\/\/forum.buradabiliyorum.com\/\" target=\"_blank\" rel=\"noopener\">Forum.BuradaBiliyorum.Com<\/a><\/span><\/strong><\/p>\n<\/blockquote>\n<blockquote>\n<p style=\"text-align: center;\"><strong>If you want to read more like this article, you can visit our <span style=\"color: #ff9900;\"><a style=\"color: #ff9900;\" href=\"https:\/\/en.buradabiliyorum.com\/technology\/\" target=\"_blank\" rel=\"noopener\">Technology category.<\/a><\/span><\/strong><\/p>\n<\/blockquote>\n<p><span style=\"color: black;\"><a style=\"color: #ff9900;\" href=\"https:\/\/www.howtogeek.com\/858334\/how-to-find-your-ip-address-from-cmd-command-prompt\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#8220;How to Find Your IP Address From CMD (Command Prompt)&#8221; To find your local IP address from the CMD Command prompt, simply type &#8220;ipconfig&#8221; into the prompt. It will be listed as &#8220;IPv4 Address&#8221;. To find your public (external) IP address from a command prompt, type &#8220;curl ifconfig.me&#8221; on Windows 10 or 11. Like most&#8230;<\/p>\n","protected":false},"author":1,"featured_media":534111,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"fifu_image_url":"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2023\/01\/Snag_346f47.png?height=200p&trim=2,2,2,2","fifu_image_alt":"","footnotes":""},"categories":[18],"tags":[],"class_list":["post-534110","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technology"],"_links":{"self":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts\/534110","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/comments?post=534110"}],"version-history":[{"count":0,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts\/534110\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/media\/534111"}],"wp:attachment":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/media?parent=534110"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/categories?post=534110"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/tags?post=534110"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}