What Command Prompt shows you about your IP address

Command Prompt (cmd) is a built-in Windows tool that lets you see your device's IP address in seconds. When you run the right command, Windows displays both your local IP address (the one your router assigns to your device) and information about your network connection. This is useful when you're setting up a home network, troubleshooting why a device won't connect, or checking whether your router is assigning addresses correctly.

The command you need is ipconfig. Type it into Command Prompt and press Enter, and you'll see a list of all network adapters on your computer along with their IP addresses. For most home networks, you're looking for the line that says "IPv4 Address" under your active connection — that's the address your router gave your computer.

This is different from your public IP address (the one the internet sees when you visit a website). Command Prompt shows you the private address only — the one that matters for your home network and for the security decisions you make there.

Key Takeaways

  • Open Command Prompt by pressing Windows key + R, typing cmd, and pressing Enter.
  • Type ipconfig and press Enter to see your local IP address listed as "IPv4 Address".
  • Your local IP address usually starts with 192.168 or 10.0 and is assigned by your router.
  • If you see "Media State: Media disconnected" next to an adapter, that device is not connected to your network.
  • Run ipconfig /all to see additional details like your MAC address and DNS server, which are sometimes needed for network troubleshooting.

How to open Command Prompt on Windows

The fastest way is to use the keyboard shortcut. Press the Windows key and R at the same time. A small box labeled "Run" will appear. Type cmd (just those three letters) and press Enter. Command Prompt opens as a black window with white text.

If the keyboard shortcut doesn't work, you can also right-click the Start button, select "Windows Terminal (Admin)" or "Command Prompt (Admin)", and you'll get the same result. The Admin version gives you permission to run more advanced commands, though you don't need it just to see your IP address.

Running ipconfig to find your local IP address

Once Command Prompt is open, type ipconfig and press Enter. Windows displays information about every network adapter on your computer. You'll see sections labeled with names like "Ethernet adapter" or "Wireless LAN adapter" depending on how your computer connects to the network.

Look for the section that shows your active connection — usually the one labeled "Wireless LAN adapter" if you're on Wi-Fi, or "Ethernet adapter" if you're plugged in with a cable. Under that section, find the line that says "IPv4 Address". The number next to it (something like 192.168.1.105) is your local IP address. Write it down if you need it for router settings or device setup.

If you see multiple adapters and aren't sure which one is active, look for the one where "Media State" says "Media connected". Adapters that say "Media disconnected" are not currently in use.

Understanding what ipconfig /all shows you

If you type ipconfig /all instead of just ipconfig, you get more detailed information about each adapter. This includes your MAC address (a unique identifier for your network card), your DNS servers (the computers that translate website names into IP addresses), and your DHCP server (the device on your network that assigns IP addresses — usually your router).

You'll need the MAC address if you're setting up MAC filtering on your router or if your router's setup page asks for it. You'll need the DNS server information if you're troubleshooting why websites won't load even though you're connected to the network. Most of the time, though, you only need the IPv4 address.

Why your IP address matters for home network security

Knowing your device's local IP address is the first step in understanding what your router is doing. When you log into your router's settings page (usually by typing 192.168.1.1 or 10.0.0.1 into a web browser), you're using the router's IP address, not your device's. But once you're in the router, you can see a list of all devices connected and the IP addresses the router assigned to each one.

This matters because if you see an IP address on that list that you don't recognize, it means an unknown device is connected to your network. That's when you know to change your Wi-Fi password or investigate further. You can also use your device's IP address to set up port forwarding (if you're running a server) or to configure which devices get priority bandwidth.

What to do if ipconfig shows no IP address

If you run ipconfig and see "Media disconnected" for all adapters, or if the IPv4 Address field is blank or shows 169.254.x.x, your device is not connected to the network. First, check that your Wi-Fi is turned on or that your ethernet cable is plugged in. Then restart your router by unplugging it for 30 seconds and plugging it back in.

If the connection still doesn't work after the restart, open your router's settings page (the address is usually printed on the router itself) and check whether your device appears in the list of connected devices. If it doesn't, your router may not be broadcasting your Wi-Fi network, or your device may have forgotten the password. Reconnect to the network manually by going to your Wi-Fi settings and entering the password again.

Finding your router's IP address from Command Prompt

Your router also has an IP address, and you need it to log into the router's settings. You can find it using Command Prompt by typing ipconfig and looking for the line labeled "Default Gateway" under your active connection. That address (usually 192.168.1.1 or 10.0.0.1) is your router's IP address. Type it into a web browser's address bar to open your router's login page.

Once you're logged in, you can see all devices connected to your network, change your Wi-Fi password, set up a guest network, or adjust security settings. Keep your router's IP address and login password somewhere safe — you'll need them if you ever need to troubleshoot your network or change how it works.

Frequently Asked Questions

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

Your local IP (shown by ipconfig) is assigned by your router and only works inside your home network. Your public IP is assigned by your internet provider and is what websites see when you visit them. You can find your public IP by searching "what is my IP" in a web browser.

Why does my IPv4 address start with 169.254?

That means your device tried to connect to the network but couldn't reach the router's DHCP server (the part that assigns addresses). Restart your router and reconnect to the Wi-Fi. If it keeps happening, your router may need a restart or a factory reset.

Can I change my local IP address?

You can, but you usually shouldn't. Your router assigns it automatically. If you need a device to always have the same address (for port forwarding or server setup), log into your router and set up a static IP or DHCP reservation instead of changing it manually.

Is it safe to share my local IP address?

Your local IP only works inside your home network, so sharing it with someone outside your home doesn't give them access to anything. But don't share it with people you don't trust who are on your Wi-Fi, because they could use it to target your device on the network.

What if Command Prompt won't open?

Try pressing Windows key + R again and typing cmd. If that doesn't work, click the Start button, type "command prompt" in the search box, and click the result. If you're on Windows 11, you may see "Windows Terminal" instead, which works the same way.