Open Command Prompt and run the right command

The fastest way to find your IP address is to open Command Prompt and type ipconfig, then press Enter. Windows will display a list of network adapters on your computer, and your IP address appears next to "IPv4 Address" — it looks like four numbers separated by periods, such as 192.168.1.5.

To open Command Prompt, press the Windows key, type cmd, and select "Command Prompt" from the results. You can also right-click the Start button and choose "Terminal" or "Command Prompt" depending on your Windows version.

If you have multiple network adapters (for example, both Ethernet and Wi-Fi), you will see separate sections for each one. Look for the adapter you are actually using — if you are connected by cable, check the Ethernet section; if you are on Wi-Fi, check the Wi-Fi or wireless adapter section.

Key Takeaways

  • Type ipconfig in Command Prompt to see all your network adapters and their IP addresses at once.
  • Your IPv4 address is the four-number format (like 192.168.1.5) that most home networks and older systems use.
  • If you see multiple adapters listed, find the one matching your actual connection method — Ethernet for wired, Wi-Fi for wireless.
  • Type ipconfig /all to see additional details like your MAC address, DNS servers, and DHCP status for troubleshooting.

Understanding IPv4 versus IPv6 addresses

Command Prompt shows two types of addresses: IPv4 and IPv6. IPv4 is the older, more common format and appears as four numbers (0–255) separated by dots, like 192.168.1.100. IPv6 is the newer format and looks like a string of letters and numbers separated by colons, like 2001:0db8:85a3:0000:0000:8a2e:0370:7334.

Most home networks and everyday devices still use IPv4. Unless you specifically need IPv6 information — for example, if you are setting up an IPv6-only network or troubleshooting a specific service — your IPv4 address is the one you need. Both appear in the ipconfig output, so you can identify which is which by the format.

Getting more detailed network information

If you need more than just your IP address, type ipconfig /all instead. This command shows your MAC address (the physical identifier for your network card), your DHCP server, lease times, DNS servers, and whether DHCP is enabled. This information is useful if you are troubleshooting network problems or setting up a static IP address.

The output will be longer and include more fields, but the structure is the same — each adapter is listed separately with its details underneath. Scroll up in Command Prompt if the output runs off the screen, or right-click the title bar, select "Properties," and increase the buffer size to see more at once.

Refreshing your IP address from the command line

If you need to release your current IP address and get a new one from your router, type ipconfig /release followed by ipconfig /renew. The first command tells your computer to stop using its current address; the second asks your router for a new one. This usually takes a few seconds, and your new address will appear when you run ipconfig again.

This is different from simply viewing your address — it actually changes it. Use this only if you are troubleshooting network issues or if your internet connection is unstable and you want to force a fresh connection to your router.

Finding your public IP address

The address that ipconfig shows is your local IP address — the one your router assigns to your computer on your home network. Your public IP address — the one the internet sees when you visit websites — is different and cannot be found in Command Prompt.

To find your public IP, you need to visit a website like whatismyipaddress.com or search "what is my IP" in any browser. The site will display the address your internet service provider assigned to your router. This is useful if you need to set up remote access, port forwarding, or if you are troubleshooting why a website thinks you are in a different location.

Saving your network information to a file

If you need to keep a record of your network settings, you can save the ipconfig output to a text file. Type ipconfig /all > network_info.txt and press Enter. Command Prompt will create a file called network_info.txt in your user folder containing all the information that would normally display on screen.

You can then open this file in Notepad or any text editor to review it later, share it with technical support, or compare it to previous outputs if you are tracking changes to your network. Replace "network_info.txt" with any filename you prefer.

Frequently Asked Questions

What is the difference between ipconfig and ipconfig /all?

ipconfig shows the basic information for each network adapter: IP address, subnet mask, and default gateway. ipconfig /all includes everything ipconfig shows, plus MAC address, DHCP server, lease times, DNS servers, and other advanced details. Use ipconfig for quick lookups and ipconfig /all when you need to troubleshoot or configure network settings.

Why do I see multiple IP addresses in the output?

Each network adapter on your computer gets its own IP address. If you have both Ethernet and Wi-Fi, or if you have virtual network adapters, you will see separate sections for each. Find the adapter you are actually using — the one connected to your network — and use that IP address.

Can I change my IP address using Command Prompt?

You can release and renew your address using ipconfig /release and ipconfig /renew, which asks your router for a new one. To set a static IP address that does not change, you need to go into your network adapter settings in Windows, not Command Prompt. This is more complex and usually only necessary for servers or specific network setups.

What should I do if ipconfig shows "media disconnected"?

This means the adapter exists but is not connected to a network. Check that your Ethernet cable is plugged in or that you are connected to Wi-Fi. Once you connect, run ipconfig again and the address should appear. If it still does not, restart your router and computer.