What Command Prompt does and why you might need your IP address
Command Prompt is a text-based tool built into Windows that lets you talk directly to your computer without clicking through menus. One of the things it can tell you is your IP address — the number your device uses to connect to your network and the internet. You might need this number to troubleshoot a slow connection, set up port forwarding on your router, or give to someone helping you fix a network problem.
Your computer actually has two IP addresses: a local IP address (the one your home network uses to talk to your devices) and a public IP address (the one the internet sees). Command Prompt shows you the local one, which is what you need most often for home network work.
Key Takeaways
- Open Command Prompt by typing "cmd" in the Windows search box, then type ipconfig and press Enter to see your local IP address.
- Look for "IPv4 Address" in the results — that is the number you need for most home network tasks.
- Your IP address usually starts with 192.168 or 10.0 on a home network, and it can change if you restart your router or computer.
- If you need your public IP address instead, use a website like whatismyipaddress.com rather than Command Prompt.
Opening Command Prompt on Windows
The fastest way is to use the search box. Click the Windows search icon (the magnifying glass) in the bottom left corner of your screen, type cmd, and press Enter. A black window will open — that is Command Prompt.
If you want to open it a different way, you can also right-click on the Start button and select "Windows Terminal" or "Command Prompt" from the menu. Either one works for finding your IP address.
Running ipconfig to see your IP address
Once Command Prompt is open, type ipconfig (all one word, no spaces) and press Enter. The window will fill with information about every network connection your computer has.
Look for a section labeled "Ethernet adapter" or "Wireless LAN adapter" — whichever one you use to connect to your router. Under that section, find the line that says "IPv4 Address". The number next to it is your local IP address. It will look something like 192.168.1.105 or 10.0.0.50.
Understanding what the numbers mean
Your local IP address is four groups of numbers separated by dots. On most home networks, the first two or three groups stay the same for every device, and only the last group changes. For example, if your address is 192.168.1.105, then 192.168.1 is your network, and 105 is your device's spot on that network.
The "Subnet Mask" line (usually 255.255.255.0 on home networks) tells your computer which part of the address is the network and which part is the device. You do not need to change this for basic troubleshooting.
Why your IP address might change
Every time you restart your router or your computer, your device might get assigned a different IP address. This happens because your router hands out addresses automatically using something called DHCP. For most everyday tasks, this does not matter — your device will still work the same way.
If you are setting up port forwarding or remote access, a changing IP address becomes a problem. In that case, you can set a static IP address on your device through your router's settings, which locks your device to the same number. That is a separate process from what Command Prompt does, but knowing your current IP address is the first step.
Finding your public IP address instead
Command Prompt shows you your local IP address — the one your home network uses. If you need your public IP address (the one the internet sees when you browse), Command Prompt cannot show you that directly.
To find your public IP, open a web browser and go to whatismyipaddress.com or whatismyip.com. The page will display your public IP right away. You can also type "what is my IP" into any search engine and it will show you at the top of the results.
Troubleshooting if ipconfig does not show what you expect
If you see an address that starts with 169.254, your computer is not connected to your router properly. Restart your router (unplug it for 30 seconds, then plug it back in) and run ipconfig again. If the problem continues, check that your WiFi or ethernet cable is actually connected.
If you see multiple network adapters listed and you are not sure which one is yours, look for the one that has an IPv4 address starting with 192.168 or 10.0. That is your home network. Adapters with other addresses (like 172.16) are usually virtual networks or VPN connections, which you can ignore for basic troubleshooting.
Frequently Asked Questions
Can I change my IP address using Command Prompt?
Command Prompt can show you your IP address, but it cannot change it directly. To set a static IP address, you go through your router's settings or your computer's network settings, not Command Prompt. If you just want a temporary change, restarting your router usually gives you a new one.
Is my IP address private information I should hide?
Your local IP address (the 192.168 one) is only visible on your home network, so it is not a privacy risk. Your public IP address is visible to websites you visit, but it only tells someone your general location and internet provider — not your exact address or identity. You do not need to hide it for basic security.
What if I get an error when I type ipconfig?
Make sure you typed it correctly — it is "ipconfig" with no spaces or capital letters. If you still get an error, try opening Command Prompt as an administrator: right-click the search result and select "Run as administrator" before typing the command.
Do I need my IP address to connect to my WiFi?
No. Your IP address is assigned automatically after you connect. You only need your WiFi password to join the network. You would need your IP address later if you are troubleshooting a connection problem or setting up something like a printer on your network.