Open Command Prompt and run one command to see your IP address

The fastest way to find your IP address on Windows is to open Command Prompt and type a single command. Command Prompt is a text-based program built into Windows that lets you run system commands. Within seconds, you'll see your IP address displayed on screen.

You don't need any special software or settings knowledge. The command works the same way on Windows 10, Windows 11, and earlier versions. If you're on a Mac or Linux computer, the process is slightly different — those systems use Terminal instead of Command Prompt, though the concept is the same.

Key Takeaways

  • Open Command Prompt by pressing the Windows key, typing "cmd", and pressing Enter.
  • Type ipconfig and press Enter to see your IP address listed as "IPv4 Address".
  • Your local IP address (starting with 192.168 or 10.) is what your devices use inside your home or office network.
  • To find your public IP address instead, use the command curl ifconfig.me or search "what is my IP" in a web browser.
  • Command Prompt shows additional network information like your gateway and DNS servers if you need to troubleshoot connection problems.

Step-by-step: Finding your IP address in Command Prompt

Step 1: Open Command Prompt. Press the Windows key on your keyboard (the key with the Windows logo). Type "cmd" without quotes. You'll see "Command Prompt" appear in the search results. Press Enter or click on it to open the program.

Step 2: Type the command. In the Command Prompt window, type ipconfig (all lowercase, no spaces). This is short for "IP configuration." Press Enter. The program will display a list of network information.

Step 3: Find your IP address. Look for the section labeled with your network connection name (usually "Ethernet" if you're plugged in with a cable, or "Wireless LAN adapter" if you're using WiFi). Under that section, find the line that says "IPv4 Address". The number next to it is your local IP address — it typically looks like 192.168.1.100 or 10.0.0.50.

That's all you need to do. You now have your IP address. You can close Command Prompt by typing "exit" and pressing Enter, or just clicking the X button.

Understanding what ipconfig shows you

When you run the ipconfig command, Command Prompt displays several pieces of information about your network connection. The most important line is "IPv4 Address" — this is your local IP address, the one your computer uses to communicate with other devices on your home or office network.

You'll also see "Default Gateway" listed. This is your router's address — the device that connects your home network to the internet. Below that is "DHCP Server", which is usually the same as your gateway. This is the device that automatically assigned your IP address to you.

If you see multiple network adapters listed (for example, both Ethernet and WiFi), look at the one you're actually using to connect. If you're plugged in with a cable, use the Ethernet section. If you're on WiFi, use the Wireless LAN adapter section.

Local IP versus public IP: Which one do you need?

The IP address that ipconfig shows you is your local IP address. It only works inside your network — other people on the internet cannot see it or use it to reach your computer. This is the address you use when connecting to your printer, security cameras, or other devices at home.

Your public IP address is different. This is the address that the rest of the internet sees when you visit websites or send data online. Your router handles the translation between the two. If you need to find your public IP address, the easiest way is to open a web browser and search "what is my IP" — Google will display it at the top of the results. You can also type curl ifconfig.me into Command Prompt if you prefer to stay in the same window.

For most everyday tasks — connecting to home devices, troubleshooting your WiFi, or setting up a printer — you need your local IP address. Your public IP address matters mainly if you're hosting a server or need to let someone outside your network connect to your computer.

Troubleshooting: What if ipconfig doesn't show an IP address?

If you run ipconfig and see "Media State: Media Disconnected" or no IPv4 Address listed, your computer is not connected to the network. Check that your WiFi is turned on, or if you're using a cable, make sure it's plugged in firmly to both your computer and your router.

If you're connected but still don't see an IP address, wait 30 seconds and run ipconfig again. Sometimes it takes a moment for your computer to receive an address from the router. If the problem continues, restart your router by unplugging it for 10 seconds, plugging it back in, and waiting two minutes for it to fully restart.

If you see an IP address starting with 169.254, your computer is connected to the network but did not receive an address from the router. This usually means the router's DHCP service (the part that assigns addresses) is not working. Try restarting your router as described above, or restart your computer.

Other useful ipconfig commands

The basic ipconfig command shows your current network setup. If you need more detailed information, you can add extra words to the command to change what it displays.

Type ipconfig /all to see complete information about every network adapter on your computer, including your MAC address (a different kind of network identifier), DNS servers, and DHCP lease information. This is useful if you're troubleshooting a network problem or need to provide technical support with detailed information.

Type ipconfig /release followed by ipconfig /renew if your computer is not getting an IP address from the router. These commands tell your computer to give up its current address and ask the router for a new one. Run them one at a time and wait a few seconds between them.

Using ipconfig on Mac or Linux

If you're using a Mac, Command Prompt doesn't exist — you use Terminal instead. Open Terminal by pressing Command + Space, typing "terminal", and pressing Enter. Then type ifconfig (note: no "p" at the start). Look for "inet" to find your local IP address.

On Linux, open a terminal window and type the same command: ifconfig. The output is similar to Mac. If that doesn't work, try ip addr instead — newer Linux systems use this command. Look for "inet" to find your IP address.

Frequently Asked Questions

Why does my IP address keep changing?

Your local IP address can change if your router restarts or if your computer disconnects and reconnects to the network. This is normal. Your public IP address changes less often but can shift if your internet service provider restarts your modem. If you need a stable local IP address for a device like a printer, you can set a static IP in your router settings.

Is it safe to share my IP address?

Your local IP address is only useful inside your own network, so sharing it with someone outside your home does nothing. Your public IP address is already visible to every website you visit, so it's not a secret. However, do not share your full network information (like your gateway or DHCP server details) with people you don't trust.

Can I change my IP address using Command Prompt?

You can release and renew your IP address using ipconfig commands, but you cannot choose a specific new address this way. To set a static IP address that doesn't change, you need to go into your router settings or your computer's network settings, not Command Prompt.

What's the difference between IPv4 and IPv6?

IPv4 addresses look like 192.168.1.100 (four numbers separated by dots). IPv6 addresses look like 2001:0db8:85a3:0000:0000:8a2e:0370:7334 (letters and numbers separated by colons). IPv6 is newer and allows for many more addresses, but most home networks still use IPv4. Both may appear in your ipconfig output.