Lookup IP Address & Location via the Command Line
<p>With <a href="https://ifconfig.co">ifconfig.co</a>, you can lookup your external IP Address and Location Information using a simple curl command. You can use it like so:</p> <div class="highlight"><pre class="highlight shell"><code><span class="nv">$ </span>curl ifconfig.co/json <span class="o">{</span> <span class="s2">"ip"</span>: <span class="s2">"96.27.202.202"</span>, <span class="s2">"ip_decimal"</span>: 1612409628, <span class="s2">"country"</span>: <span class="s2">"United States"</span>, <span class="s2">"country_iso"</span>: <span class="s2">"US"</span>, <span class="s2">"city"</span>: <span class="s2">"Columbus"</span>, <span class="s2">"hostname"</span>: <span class="s2">"d27-96-101-101.nap.wideopenwest.com"</span> <span class="o">}</span> <span class="nv">$ </span>curl ifconfig.co/city Columbus <span class="nv">$ </span>curl ifconfig.co/country United States </code></pre></div>