How to find your IP address in Command Prompt

Open Command Prompt, type ipconfig, and press Enter. Your local IP address appears next to "IPv4 Address" in the results. This is the address your device uses on your home or office network. If you need your public IP address instead — the one your internet provider assigns to your router — type curl ifconfig.me or visit a site like whatismyipaddress.com in your browser.

Command Prompt is the fastest way to see your IP because it shows the information instantly without opening a browser or downloading anything. The ipconfig command works on every Windows computer and displays all network connections at once, so you can see which one is active.

Key Takeaways

  • Type ipconfig in Command Prompt to see your local IP address next to "IPv4 Address".
  • Your local IP is what devices on your network use to reach you; your public IP is what the internet sees.
  • Command Prompt shows results instantly without needing a browser or internet search.
  • If you need your public IP, type curl ifconfig.me in Command Prompt or check a website instead.

Opening Command Prompt on Windows

Press the Windows key and type cmd, then press Enter. Command Prompt opens as a black window with a blinking cursor. You can also right-click the Start button and select "Terminal (Admin)" on Windows 11, or search for "Command Prompt" in the Start menu on Windows 10.

Running as Administrator is not required to view your IP address, but it is useful if you plan to run other network commands later. If you see a permission prompt, click "Yes" to allow Command Prompt to open.

Reading the ipconfig output

After you type ipconfig and press Enter, you see a list of network adapters. Each one shows "IPv4 Address", "Subnet Mask", and "Default Gateway". The IPv4 Address is your local IP — usually a number like 192.168.1.100 or 10.0.0.50. This is the address other devices on your network use to communicate with your computer.

If you have multiple network adapters (for example, Ethernet and Wi-Fi), each one displays separately. Look for the adapter you are currently using — if you are on Wi-Fi, find the section labeled "Wireless LAN adapter" or "Wi-Fi". The IPv4 Address in that section is the one you need.

The Subnet Mask and Default Gateway appear below the IPv4 Address. You usually do not need these for basic tasks, but they tell your computer which other addresses are on the same network and where to send traffic that leaves your network.

Finding your public IP address instead

Your public IP is different from your local IP. Your local IP is only used inside your network; your public IP is what websites and services see when you connect to the internet. To find your public IP in Command Prompt, type curl ifconfig.me and press Enter.

This command works if you have curl installed, which comes with Windows 10 version 1803 and later. If the command does not work, you can type powershell "(Invoke-WebRequest -uri "https://ifconfig.me").Content" instead, or simply open a browser and search for "what is my IP".

Other useful ipconfig commands

ipconfig /all shows detailed information about every network adapter, including MAC address, DHCP status, and DNS servers. This is useful if you need to troubleshoot network problems or set up port forwarding on your router.

ipconfig /release disconnects your computer from the network and removes its current IP address. ipconfig /renew reconnects and requests a new IP address from your router. These commands are useful if your network connection is unstable or you want to force your router to assign you a different local IP.

Type each command exactly as shown, with a space after ipconfig, then press Enter. Command Prompt is case-insensitive, so uppercase and lowercase letters both work.

Why you might need your IP address

Your local IP is useful when you need to access your computer from another device on the same network, set up a printer or smart home device, or troubleshoot network problems. Your public IP is what you need if you are setting up remote access to your computer, checking which network a connection came from, or reporting abuse to an internet provider.

If you are trying to connect to a specific device or service, that device usually tells you what information it needs. Most of the time, you will need your local IP for things inside your home or office, and your public IP for things on the internet.

Frequently Asked Questions

Why do I see multiple IP addresses in ipconfig?

Each network adapter on your computer gets its own IP address. If you have both Ethernet and Wi-Fi, you see both. Only the adapter you are actively using to connect to the internet matters for most tasks. Look for the one labeled with your current connection type.

Does my local IP address change?

Usually not, but it can. Most home routers assign the same local IP to each device every time it connects. If you want a permanent local IP, you can set a static IP in your router settings or in your network adapter settings, though this is rarely necessary for everyday use.

Is my IP address the same as my MAC address?

No. Your IP address is a network address that changes depending on which network you join. Your MAC address is a hardware identifier that stays the same. Command Prompt shows both — your IP is the IPv4 Address, and your MAC is the Physical Address shown in ipconfig /all.

Can I hide my public IP address?

A VPN (virtual private network) hides your public IP by routing your traffic through another server. Your ISP and websites you visit see the VPN server's IP instead of yours. This is useful for privacy, but it slows your connection slightly and some services block VPN traffic.

What if ipconfig shows 169.254.x.x as my IP?

This means your computer could not reach your router to get an IP address. Check that your network cable is plugged in or that you are connected to Wi-Fi. Restart your router and your computer, then run ipconfig /renew to request a new address.