How to find your IP address in Command Prompt
Open Command Prompt on your Windows computer and type ipconfig, then press Enter. The tool will display a list of all network connections on your device. Look for the section labeled with your active network — usually "Ethernet adapter" if you are plugged in with a cable, or "Wireless LAN adapter" if you are on Wi-Fi. Next to "IPv4 Address" you will see a number like 192.168.1.5 or 10.0.0.3. That is your local IP address — the one your router assigned to this specific device.
If you see multiple network adapters listed, you only need the one that shows an actual IP address. Disabled or disconnected adapters will show "Media disconnected" or no address at all, so you can skip those. The IPv4 address is the one you are looking for; ignore the IPv6 address below it unless you have a specific reason to use it.
This same Command Prompt window also shows your router's address (listed as "Default Gateway") and your DNS servers. Write down the IPv4 address if you need it for printer setup, network troubleshooting, or port forwarding — you will likely need it again.
Key Takeaways
- Type ipconfig in Command Prompt and press Enter to see all your network adapters and their assigned addresses.
- Your local IP address appears next to "IPv4 Address" under whichever adapter is currently connected (Ethernet or Wireless LAN).
- The address usually starts with 192.168 or 10.0 and is assigned by your router, not the internet.
- You can also see your router's address and DNS servers in the same output, which are useful for other network tasks.
Understanding what ipconfig shows you
When you run ipconfig, Command Prompt returns information about every network adapter your computer has, whether it is in use or not. Each adapter gets its own section with several pieces of information. The most important line for everyday use is "IPv4 Address" — this is the address your router uses to send data to your device on the local network.
Below the IPv4 address you will see "Subnet Mask" (usually 255.255.255.0), which tells your device which other addresses are on the same local network. You will also see "Default Gateway," which is your router's address — typically 192.168.1.1 or 192.168.0.1. If you ever need to log into your router to change Wi-Fi settings or port forwarding rules, you type that gateway address into a web browser.
The "DHCP Enabled" line tells you whether your router is automatically assigning this address or whether it was set manually. For most home networks, DHCP is enabled, meaning your router picks a new address each time you restart — which is why your IP address can change from day to day.
Finding your public IP address instead
The address ipconfig shows you is your local IP address — it only works inside your home network. Your internet service provider also assigns you a different address, called your public IP address, which the rest of the internet uses to reach your home. If you need your public IP, Command Prompt has a different command.
Type nslookup myip.opendns.com resolver1.opendns.com and press Enter. Command Prompt will query a public DNS server and return your public IP address in the results. Look for the line that shows an address like 203.0.113.42 — that is what the outside world sees when your device connects to the internet. This address changes less often than your local IP, but your ISP can still reassign it if you restart your modem or after a period of inactivity.
Most people do not need their public IP for everyday tasks. You need it only if you are setting up remote access to your home computer, hosting a game server, or troubleshooting a connection issue with your ISP.
Step-by-step: Opening Command Prompt the right way
On Windows 10 or 11, the fastest way is to click the Start button, type cmd, and press Enter. Command Prompt will open when ready. Alternatively, you can right-click the Start button and select "Terminal" or "Windows PowerShell" — both will run the same ipconfig command and show the same results.
If you are on an older version of Windows, click Start, then All Programs, then Accessories, then Command Prompt. Once the window is open, you are ready to type your command. The window itself does not matter — what matters is that you can type and see the results.
Do not worry about administrator mode for ipconfig. Unlike some network commands, ipconfig works from a regular Command Prompt window without special permissions. If you see an error message, it usually means you typed the command wrong — check for typos and try again.
What to do if ipconfig does not show an address
If you run ipconfig and see "Media disconnected" or no IPv4 address listed, your device is not currently connected to the network. Check that your Ethernet cable is plugged in, or that you are connected to your Wi-Fi network. Once you reconnect, run ipconfig again and the address should appear.
If you are connected but still see no address, your router may not be assigning one. Restart your router by unplugging it for 30 seconds, then plugging it back in. Wait a minute for it to fully boot, then run ipconfig again. If the address still does not appear, restart your computer as well — sometimes the network adapter needs a fresh start to request a new address from the router.
In rare cases, you may see an address starting with 169.254 — this means your device tried to get an address from the router but failed, so Windows assigned a temporary one instead. This usually fixes itself once the router is working again, but if it persists, restart both devices and check that your router is not having connection problems.
Using ipconfig for network troubleshooting
Once you know how to read ipconfig output, you can use it to diagnose common network problems. If two devices on your network have the same IP address, one of them will lose connection — ipconfig helps you spot this by showing you what address each device has. If a device is not connecting to the internet but is connected to Wi-Fi, ipconfig tells you whether the router assigned it an address at all.
You can also use ipconfig to release and renew your address if your connection feels stuck. Type ipconfig /release to tell your router you are done with your current address, then type ipconfig /renew to ask for a new one. This takes only a few seconds and often fixes connection glitches without requiring a full restart.
Another useful command is ipconfig /all, which shows extra details like your MAC address (the physical identifier of your network card) and the DNS servers your device is using. You need this information less often, but it is there if a technician asks for it or if you are setting up advanced network features.
Frequently Asked Questions
Why does my IP address change every time I restart?
Your router uses DHCP to automatically assign addresses, and it does not always give the same one twice. If you need a permanent address for a device — like a printer or security camera — you can set a static IP in your router settings, which tells it to always assign the same address to that device.
Is my local IP address private and safe to share?
Yes. Your local IP only works inside your home network, so sharing it with someone outside your home does them no good. Your public IP is the one you should keep private, since it can be used to identify your location and ISP.
Can I change my IP address using Command Prompt?
You can release and renew it with ipconfig /release and ipconfig /renew, which may give you a different address. To set a permanent static address, you need to change your router settings or your network adapter settings in Windows, not Command Prompt.
What does the subnet mask number mean?
The subnet mask (usually 255.255.255.0) tells your device which other addresses are on the same local network. In most home networks, any address starting with 192.168.1 or 10.0.0 is local, and anything else goes through your router to reach the internet.
Do I need to remember my IP address?
Not usually. You can look it up in Command Prompt anytime you need it. Write it down only if you are setting up a device that needs it, like port forwarding or a static printer address, and you know you will need it again soon.