Search Authority

How to Check IP Address on Command Prompt: Simple Steps & Tips

Knowing how to check IP address on command prompt helps you troubleshoot network issues and verify your computer’s current addressing. This guide walks through the most reliab...

Mara Ellison Jul 24, 2026
How to Check IP Address on Command Prompt: Simple Steps & Tips

Knowing how to check IP address on command prompt helps you troubleshoot network issues and verify your computer’s current addressing. This guide walks through the most reliable commands and flags so you can quickly locate both local and public address details.

Use these steps on Windows, macOS, and Linux to see exactly how your device connects to routers, servers, and the internet.

Platform Command to check IP Shows Local Address Shows Public-Friendly Info
Windows ipconfig Yes No
macOS & Linux ifconfig or ip addr Yes No
All platforms curl ifconfig.me No Yes
All platforms curl api.ipify.org No Yes

Using ipconfig on Windows to check IP

On Windows machines, the ipconfig command in Command Prompt is the fastest way to review TCP/IP configuration and local address details.

Open Command Prompt

Press Windows key + R, type cmd, and hit Enter to launch Command Prompt.

Run ipconfig

Type ipconfig and press Enter; look for the section labeled Ethernet adapter or Wireless LAN adapter to see the IPv4 address assigned to your machine.

Using ifconfig and ip addr on macOS and Linux

macOS and Linux systems offer ifconfig and the newer ip addr command to display interface details, including local address information and link status.

Check with ifconfig

Open Terminal and type ifconfig; locate en0 or eth0 to find the IPv4 address for your primary network connection.

Check with ip addr

On systems where ifconfig is missing, run ip addr show and review the inet line under your active interface to identify the local address.

Finding your public IP from the command line

Your public IP is the address seen by remote servers, and you can retrieve it directly from the terminal using simple curl requests.

curl ifconfig.me

Running curl ifconfig.me returns your public-facing IP in plain text, ideal for quick verification without extra formatting.

curl api.ipify.org

The command curl api.ipify.org provides the same result, with optional query parameters to customize output as needed.

Diagnosing common IP issues

When network connectivity behaves unexpectedly, combining ipconfig, ifconfig, or ip addr with public IP checks narrows down whether the issue is local, router-related, or upstream.

Compare the local address shown on your device against router admin pages to confirm DHCP assignments and detect conflicts.

Testing public reachability through curl services helps verify NAT, firewall rules, and whether your ISP connection is blocking traffic.

Best practices for IP verification

  • Run ipconfig, ifconfig, or ip addr to confirm local addresses before contacting support.
  • Use curl ifconfig.me or curl api.ipify.org to validate public IP changes from your ISP.
  • Document static addresses in your network notes to avoid confusion during troubleshooting.
  • Check default gateway entries to ensure your device is pointing at the correct router interface.
  • Combine terminal commands with router logs for a complete picture of network behavior.

FAQ

Reader questions

Why does my ipconfig IPv4 address start with 169.254?

A 169.254.x.x address indicates your device could not reach the DHCP server, so Windows assigned a link-local address; check your router and cable connections.

Can I see my router’s internal IP from the command prompt?

Yes, in ipconfig output look for Default Gateway under your active adapter; on macOS and Linux check the gateway line in ifconfig or ip addr output.

What does it mean if curl ifconfig.me shows a different address than ipconfig?

The difference shows local private addressing versus public addressing; your router translates traffic between them using network address translation.

How do I release and renew my IP address after checking it?

On Windows use ipconfig /release followed by ipconfig /renew; on macOS and Linux restart your network service or DHCP client to obtain a new address.

Related Reading

More pages in this topic cluster.

How to Tell the Difference Between Silver and Aluminum (Silver vs Aluminum)

Spotting the difference between silver and aluminum helps you verify purchases, appraise items, and avoid overpaying for misidentified metals. While they look similar at first g...

Read next
Excel Keyboard Shortcut for Strikethrough: Easy Step-by-Step Guide

Mastering the Excel keyboard shortcut for strikethrough helps you track completed tasks, revisions, and action items without leaving the keyboard. This small efficiency habit sp...

Read next
Durham NC News Today: Latest Headlines & Updates

Durham NC news keeps the Research Triangle region informed about breakthrough healthcare, education, and downtown development. Local reporting connects residents and visitors to...

Read next