How to find your IP address in Command Prompt

Open Command Prompt on your Windows computer and type ipconfig, then press Enter. The tool displays your local IP address (the one your router assigned to your device) under "IPv4 Address" — it usually starts with 192.168 or 10.0. This is the address you need to know if you're troubleshooting network problems, setting up port forwarding, or connecting to devices on your home network.

Command Prompt is built into Windows and requires no installation. You can open it by typing "cmd" into the Windows search box, or by pressing Windows key + R, typing "cmd", and pressing Enter. The ipconfig command works the same way on every Windows version from Windows 7 forward.

Your computer actually has two IP addresses: a local one (used only inside your home network) and a public one (assigned by your internet provider, visible to websites you visit). The ipconfig command shows only the local address. If you need your public IP address instead, you would use a different method — but for home network setup and troubleshooting, the local address from ipconfig is what matters.

Key Takeaways

  • Type ipconfig in Command Prompt and press Enter to see your local IP address under "IPv4 Address".
  • Your local IP address usually begins with 192.168 or 10.0 and is used only within your home network.
  • Command Prompt is built into Windows and opens through the search box or Windows key + R.
  • The ipconfig command also shows your router's address (listed as "Default Gateway") and your DNS servers, both useful for network troubleshooting.

Understanding what ipconfig shows you

When you run ipconfig, the output lists every network connection on your computer. Most home computers show at least two: Ethernet (if you're plugged in with a cable) and Wi-Fi (if you're connected wirelessly). Each one has its own section with an IPv4 Address. If you're connected to your network through Wi-Fi, look under the Wi-Fi adapter section for the address you need.

Below the IPv4 Address, you'll see the "Default Gateway" — this is your router's local address, usually 192.168.1.1 or 192.168.0.1. You need this address if you want to log into your router's settings to change the Wi-Fi password, set up port forwarding, or check which devices are connected. The output also shows your DNS servers, which translate website names into addresses your computer can use.

If you see "Media State: Media Disconnected" under a network adapter, that connection is not currently active. Ignore those sections and focus on the adapter that shows "Media State: Media Connected" — that's the one actually linking you to your network.

Getting more detailed network information

If you need more information than ipconfig provides, use ipconfig /all instead. This command shows your MAC address (a unique identifier for your network card), your DHCP server, when your IP address lease expires, and other technical details. The MAC address is useful if you're setting up MAC filtering on your router or trying to identify a specific device on your network.

For most home network troubleshooting, the basic ipconfig output is enough. Use the /all version only if you're specifically looking for one of those additional details — the extra information can be overwhelming if you're just trying to find your IP address quickly.

Renewing or releasing your IP address

If your internet connection is unstable or your computer can't reach your router, you can use Command Prompt to release your current IP address and request a new one from your router. Type ipconfig /release and press Enter, wait a few seconds, then type ipconfig /renew and press Enter. Your computer will disconnect from the network briefly, then reconnect and receive a fresh IP address from your router's DHCP server.

This process fixes many temporary network problems — similar to unplugging your router and plugging it back in, but faster and more targeted. If your computer still can't connect after renewing, the problem is likely with your router or internet connection rather than your computer's network settings.

Finding a specific device's IP address on your network

If you need to find the IP address of another device on your home network — a printer, security camera, or another computer — use the arp -a command in Command Prompt. This displays a list of all devices your computer has recently communicated with, showing their IP addresses and MAC addresses. Look for the device name or MAC address you recognize.

The arp command is less reliable than ipconfig because it only shows devices your computer has actually talked to. If a device hasn't sent any data to your computer recently, it won't appear in the list. For a complete view of every device connected to your network, you'll need to log into your router's settings using the Default Gateway address from ipconfig — usually 192.168.1.1 in your web browser.

Saving your IP address information to a file

You can save the output of ipconfig to a text file for later reference. Type ipconfig > network_info.txt and press Enter. Command Prompt creates a file called "network_info.txt" in your user folder containing all the network information. This is useful if you need to share your network details with someone helping you troubleshoot, or if you want to compare your settings before and after making changes to your router.

You can open the saved file in Notepad or any text editor. If you want to add more information to the file, use ipconfig /all >> network_info.txt (with two greater-than signs) to append the detailed output to the existing file without overwriting it.

Frequently Asked Questions

What's the difference between my local IP address and my public IP address?

Your local IP address (from ipconfig) is assigned by your router and works only inside your home network. Your public IP address is assigned by your internet provider and is what websites see when you visit them. For home network setup, you need the local address. To find your public address, search "what is my IP" in any web browser.

Why does my IP address keep changing?

Your router assigns IP addresses temporarily through DHCP, usually for 24 hours or longer. When the lease expires, your computer requests a new address, which is often different. If you need a device to always have the same address (like a printer or security camera), you can set a static IP address in your router's settings or on the device itself.

Can I change my IP address using Command Prompt?

You can release and renew your address with ipconfig /release and ipconfig /renew, which usually gives you a different address. To set a permanent static IP address, you need to change your network settings in Windows or configure the device directly — Command Prompt alone cannot do this.

What if ipconfig shows "No adapters found"?

This means your network drivers are not installed or are not working. Restart your computer first. If the problem continues, check Device Manager for network adapters with a warning symbol, or reinstall your network drivers from your computer manufacturer's website.