{"id":55718,"date":"2020-05-08T15:19:41","date_gmt":"2020-05-08T19:19:41","guid":{"rendered":"https:\/\/www.inmotionhosting.com\/support\/?p=55718"},"modified":"2021-08-16T15:37:57","modified_gmt":"2021-08-16T19:37:57","slug":"how-to-find-your-local-router-ip-address-in-the-terminal","status":"publish","type":"post","link":"https:\/\/www.inmotionhosting.com\/support\/server\/ssh\/how-to-find-your-local-router-ip-address-in-the-terminal\/","title":{"rendered":"How to Find Your Local Router IP Address in the Terminal"},"content":{"rendered":"\n<p>You can use your local router&#8217;s internal IP address to test if a port is blocked by your local network, internet service provider (ISP), or <a href=\"https:\/\/www.inmotionhosting.com\/blog\/6-ways-to-secure-your-web-activity-from-your-computer\/#2\" target=\"_blank\" rel=\"noreferrer noopener\">virtual private network (VPN)<\/a>. Most operating systems (OSs) &#8211; <em>Windows, macOS, Linux, BSD, etc. <\/em>&#8211; with a graphical user interface (GUI) have pre-installed software that can give you this information. But if you&#8217;re working in the command line interface (CLI) on a related task, such as examining a <a href=\"https:\/\/www.inmotionhosting.com\/support\/server\/ssh\/read-traceroute\/\" target=\"_blank\" rel=\"noreferrer noopener\">traceroute\/tracepath<\/a>, knowing commands that can provide the same information improves your workflow.<\/p>\n\n\n\n<p>Below we cover how to <a href=\"#router\">get your local router IP address<\/a> in the terminal depending on your OS:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"#netstat\">Most OSs &#8211; Netstat<\/a><\/li><li><a href=\"#ipconfig\">Windows &#8211; ipconfig<\/a><\/li><li><a href=\"#ip-r\">Linux &#8211; ip r<\/a><\/li><\/ul>\n\n\n\n<p class=\"alert alert-warning\">These commands may display multiple IP addresses if you&#8217;re connected to a VPN. Disconnect from the VPN and rerun the command to be sure which is your local router IP. On home networks, visit the IP address in your web browser (e.g. https:\/\/192.168.0.3) to ensure it displays the login page for your home router.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"router\">Get Your Local Router IP Address<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"netstat\">Most OSs &#8211; netstat<\/h3>\n\n\n\n<p>The <code>netstat<\/code> command, pre-installed on most OSs, displays current TCP and UDP network connections with related processes. Netstat with the <code>-r<\/code> flag provides the IP routing table and internal router IP address.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">netstat -r<\/pre>\n\n\n\n<p>The results will be the IP address in the first (Destination) column:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Kernel IP routing table\nDestination     Gateway         Genmask         Flags   MSS Window  irtt Iface\n192.168.1.1     0.0.0.0         255.255.255.0   U         0 0          0 eno2<\/pre>\n\n\n\n<p>You can use <code>route<\/code> for the same results:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">route -e<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"ipconfig\">Windows &#8211; ipconfig<\/h3>\n\n\n\n<p>The <code>ipconfig<\/code> command will show your local network connections and information.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ipconfig<\/pre>\n\n\n\n<p>Your local router&#8217;s internal IP will show to the right of <em>Default Gateway<\/em> under your current network (wireless, ethernet, etc.):<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Default Gateway . . . . . . . . . : 192.168.0.1<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"ip-r\">Linux &#8211; ip r<\/h3>\n\n\n\n<p>The <code>ip<\/code> command shows similar info to <code>ifconfig<\/code> and supersedes <code>netstat<\/code> (part of <code>net-tools<\/code>) on some Linux OSs. Replacing <code>a<\/code> with <code>r<\/code> filters the results to the IP (DNS names instead of host addresses) and interfaces while <code>| grep<\/code> filters the output to only rows including \u201cdefault\u201d.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ip r | grep default<\/pre>\n\n\n\n<p>The results will show the IP among related information:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">default via 192.168.0.10 dev eno2 proto metric 100 <\/pre>\n\n\n\n<p>You can use the following commands for the same results:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ip r list | grep default<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">ip route | grep default<\/pre>\n\n\n\n<p>Want to learn more about the command line interface? Check out these <a href=\"https:\/\/www.inmotionhosting.com\/blog\/5-free-ways-to-learn-linux\/\" target=\"_blank\" rel=\"noreferrer noopener\">5 free ways to learn Linux<\/a>.<\/p>\n\n\n\n<p class=\"alert alert-info\">Develop your next great project with our secure <a rel=\"noreferrer noopener\" href=\"https:\/\/www.inmotionhosting.com\/cloud-vps\" target=\"_blank\">Cloud Server Hosting<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You can use your local router&#8217;s internal IP address to test if a port is blocked by your local network, internet service provider (ISP), or virtual private network (VPN). Most operating systems (OSs) &#8211; Windows, macOS, Linux, BSD, etc. &#8211; with a graphical user interface (GUI) have pre-installed software that can give you this information.<a class=\"moretag\" href=\"https:\/\/www.inmotionhosting.com\/support\/server\/ssh\/how-to-find-your-local-router-ip-address-in-the-terminal\/\"> Read More ><\/a><\/p>\n","protected":false},"author":57014,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4307],"tags":[],"class_list":["post-55718","post","type-post","status-publish","format-standard","hentry","category-ssh"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Find Your Local Router IP Address in the Terminal | InMotion Hosting<\/title>\n<meta name=\"description\" content=\"Learn how to find your local router&#039;s internal IP address in the terminal. Knowing your local router IP address can help you troubleshoot network connection issues and more.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.inmotionhosting.com\/support\/server\/ssh\/how-to-find-your-local-router-ip-address-in-the-terminal\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Find Your Local Router IP Address in the Terminal | InMotion Hosting\" \/>\n<meta property=\"og:description\" content=\"Learn how to find your local router&#039;s internal IP address in the terminal. Knowing your local router IP address can help you troubleshoot network connection issues and more.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.inmotionhosting.com\/support\/server\/ssh\/how-to-find-your-local-router-ip-address-in-the-terminal\/\" \/>\n<meta property=\"og:site_name\" content=\"InMotion Hosting Support Center\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/inmotionhosting\/\" \/>\n<meta property=\"article:published_time\" content=\"2020-05-08T19:19:41+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-08-16T19:37:57+00:00\" \/>\n<meta name=\"author\" content=\"InMotion Hosting Contributor\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/InMotionHosting\" \/>\n<meta name=\"twitter:site\" content=\"@InMotionHosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"InMotion Hosting Contributor\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/server\/ssh\/how-to-find-your-local-router-ip-address-in-the-terminal\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/server\/ssh\/how-to-find-your-local-router-ip-address-in-the-terminal\/\"},\"author\":{\"name\":\"InMotion Hosting Contributor\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/f9a4fc454cd1df128ee8e898d30d4644\"},\"headline\":\"How to Find Your Local Router IP Address in the Terminal\",\"datePublished\":\"2020-05-08T19:19:41+00:00\",\"dateModified\":\"2021-08-16T19:37:57+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/server\/ssh\/how-to-find-your-local-router-ip-address-in-the-terminal\/\"},\"wordCount\":367,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"articleSection\":[\"SSH and Root Access\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/server\/ssh\/how-to-find-your-local-router-ip-address-in-the-terminal\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/server\/ssh\/how-to-find-your-local-router-ip-address-in-the-terminal\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/server\/ssh\/how-to-find-your-local-router-ip-address-in-the-terminal\/\",\"name\":\"Find Your Local Router IP Address in the Terminal | InMotion Hosting\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\"},\"datePublished\":\"2020-05-08T19:19:41+00:00\",\"dateModified\":\"2021-08-16T19:37:57+00:00\",\"description\":\"Learn how to find your local router's internal IP address in the terminal. Knowing your local router IP address can help you troubleshoot network connection issues and more.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/server\/ssh\/how-to-find-your-local-router-ip-address-in-the-terminal\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/server\/ssh\/how-to-find-your-local-router-ip-address-in-the-terminal\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/server\/ssh\/how-to-find-your-local-router-ip-address-in-the-terminal\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.inmotionhosting.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Find Your Local Router IP Address in the Terminal\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"name\":\"InMotion Hosting Support Center\",\"description\":\"Web Hosting Support &amp; Tutorials\",\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\",\"name\":\"InMotion Hosting\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"contentUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"width\":696,\"height\":696,\"caption\":\"InMotion Hosting\"},\"image\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/inmotionhosting\/\",\"https:\/\/x.com\/InMotionHosting\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/f9a4fc454cd1df128ee8e898d30d4644\",\"name\":\"InMotion Hosting Contributor\",\"description\":\"InMotion Hosting contributors are highly knowledgeable individuals who create relevant content on new trends and troubleshooting techniques to help you achieve your online goals!\",\"sameAs\":[\"https:\/\/www.linkedin.com\/company\/inmotion-hosting\/\",\"https:\/\/x.com\/https:\/\/twitter.com\/InMotionHosting\"],\"url\":\"https:\/\/www.inmotionhosting.com\/support\/author\/inmotion-hosting-contributor\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Find Your Local Router IP Address in the Terminal | InMotion Hosting","description":"Learn how to find your local router's internal IP address in the terminal. Knowing your local router IP address can help you troubleshoot network connection issues and more.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.inmotionhosting.com\/support\/server\/ssh\/how-to-find-your-local-router-ip-address-in-the-terminal\/","og_locale":"en_US","og_type":"article","og_title":"Find Your Local Router IP Address in the Terminal | InMotion Hosting","og_description":"Learn how to find your local router's internal IP address in the terminal. Knowing your local router IP address can help you troubleshoot network connection issues and more.","og_url":"https:\/\/www.inmotionhosting.com\/support\/server\/ssh\/how-to-find-your-local-router-ip-address-in-the-terminal\/","og_site_name":"InMotion Hosting Support Center","article_publisher":"https:\/\/www.facebook.com\/inmotionhosting\/","article_published_time":"2020-05-08T19:19:41+00:00","article_modified_time":"2021-08-16T19:37:57+00:00","author":"InMotion Hosting Contributor","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/InMotionHosting","twitter_site":"@InMotionHosting","twitter_misc":{"Written by":"InMotion Hosting Contributor","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.inmotionhosting.com\/support\/server\/ssh\/how-to-find-your-local-router-ip-address-in-the-terminal\/#article","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/server\/ssh\/how-to-find-your-local-router-ip-address-in-the-terminal\/"},"author":{"name":"InMotion Hosting Contributor","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/f9a4fc454cd1df128ee8e898d30d4644"},"headline":"How to Find Your Local Router IP Address in the Terminal","datePublished":"2020-05-08T19:19:41+00:00","dateModified":"2021-08-16T19:37:57+00:00","mainEntityOfPage":{"@id":"https:\/\/www.inmotionhosting.com\/support\/server\/ssh\/how-to-find-your-local-router-ip-address-in-the-terminal\/"},"wordCount":367,"commentCount":1,"publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"articleSection":["SSH and Root Access"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.inmotionhosting.com\/support\/server\/ssh\/how-to-find-your-local-router-ip-address-in-the-terminal\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.inmotionhosting.com\/support\/server\/ssh\/how-to-find-your-local-router-ip-address-in-the-terminal\/","url":"https:\/\/www.inmotionhosting.com\/support\/server\/ssh\/how-to-find-your-local-router-ip-address-in-the-terminal\/","name":"Find Your Local Router IP Address in the Terminal | InMotion Hosting","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#website"},"datePublished":"2020-05-08T19:19:41+00:00","dateModified":"2021-08-16T19:37:57+00:00","description":"Learn how to find your local router's internal IP address in the terminal. Knowing your local router IP address can help you troubleshoot network connection issues and more.","breadcrumb":{"@id":"https:\/\/www.inmotionhosting.com\/support\/server\/ssh\/how-to-find-your-local-router-ip-address-in-the-terminal\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.inmotionhosting.com\/support\/server\/ssh\/how-to-find-your-local-router-ip-address-in-the-terminal\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.inmotionhosting.com\/support\/server\/ssh\/how-to-find-your-local-router-ip-address-in-the-terminal\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.inmotionhosting.com\/support\/"},{"@type":"ListItem","position":2,"name":"How to Find Your Local Router IP Address in the Terminal"}]},{"@type":"WebSite","@id":"https:\/\/www.inmotionhosting.com\/support\/#website","url":"https:\/\/www.inmotionhosting.com\/support\/","name":"InMotion Hosting Support Center","description":"Web Hosting Support &amp; Tutorials","publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.inmotionhosting.com\/support\/#organization","name":"InMotion Hosting","url":"https:\/\/www.inmotionhosting.com\/support\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/","url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","contentUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","width":696,"height":696,"caption":"InMotion Hosting"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/inmotionhosting\/","https:\/\/x.com\/InMotionHosting"]},{"@type":"Person","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/f9a4fc454cd1df128ee8e898d30d4644","name":"InMotion Hosting Contributor","description":"InMotion Hosting contributors are highly knowledgeable individuals who create relevant content on new trends and troubleshooting techniques to help you achieve your online goals!","sameAs":["https:\/\/www.linkedin.com\/company\/inmotion-hosting\/","https:\/\/x.com\/https:\/\/twitter.com\/InMotionHosting"],"url":"https:\/\/www.inmotionhosting.com\/support\/author\/inmotion-hosting-contributor\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"primary_category":null,"_links":{"self":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/55718","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/users\/57014"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/comments?post=55718"}],"version-history":[{"count":9,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/55718\/revisions"}],"predecessor-version":[{"id":82929,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/55718\/revisions\/82929"}],"wp:attachment":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/media?parent=55718"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/categories?post=55718"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/tags?post=55718"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}