Type ipconfig in Command Prompt, then read the IPv4 Address line under the adapter that is actually connected. Pick the wrong one and you end up staring at a VPN, a virtual switch, or a dead port. I use this command when I need the local address fast, and I check Wi‑Fi, Ethernet, VPNs, and older Windows builds the same way.
What you'll need
- A Windows PC running Windows 8, Windows 10, Windows 11, or Windows 7
- Access to the Run dialog or Start search
- A normal user account for a basic IP lookup
- Administrator access only if the computer blocks Command Prompt for policy reasons
How to find your IP address in Command Prompt
Use Command Prompt, also called Command Line or CLI, when you need the local network address your PC is using right now. The command you want is ipconfig. Read the IPv4 Address line for the active adapter, not the public IP from a website and not values from adapters you are not using.
What Command Prompt is
Command Prompt is the Windows text-based command line. It ships with Windows, and I still use it for quick network checks when settings pages would take longer. For this job, you usually do not need administrator access.
Local IP address versus public IP address
The address shown by ipconfig is usually your local address on the home, office, or school network. Your public IP address is the one the internet sees, and it is a different value. If you need printer access, remote desktop, or router troubleshooting, the local IPv4 address is usually the one that matters.
How do you open Command Prompt?
Open Command Prompt with Win + R, type cmd, and press Enter. On newer Windows versions, you can also search for Command Prompt from Start or the taskbar. Windows 7 users may use the Start menu search box or the same Run shortcut.
Use the Run dialog
- Press Win + R.
- Type cmd.
- Press Enter.
The Run dialog starts cmd.exe, which opens Command Prompt right away.
Use Start or taskbar search
- Open Start.
- Type Command Prompt or cmd.
- Select the result.
The guide also covers searching for Command Prompt in the taskbar. On Windows 10, the Power User menu can show Windows PowerShell instead of Command Prompt, so search is often the simpler route.
Windows 7 note
On Windows 7, open Start and type cmd in the search box, or use Win + R and run it from there. The command itself is the same.
What do you type in Command Prompt to find the IP?
Type ipconfig and press Enter. Then look for the adapter that matches your current connection, such as Wi‑Fi or Ethernet. Ignore disconnected, virtual, and tunnel adapters, because they often show numbers that are technically valid but not the address you use on the network you are actually on.
The basic command
- Open Command Prompt.
- Type
ipconfig. - Press Enter.
How to choose the right adapter
Match the adapter name to the connection in use. If the laptop is on Wi‑Fi, use the wireless adapter section. If a cable is plugged in, use the Ethernet section. If a VPN is connected, do not assume that adapter is the local address you need.
Annotated ipconfig output: what to read and what to skip
Read the IPv4 Address line under the active adapter. Skip the other fields unless you need them for troubleshooting. IPv6 Address, Default Gateway, and DNS Servers are useful networking values, but they are not the local IPv4 address most people want from Command Prompt.
| Adapter section | Example line | What it means | Read it? |
|---|---|---|---|
| Wi‑Fi | IPv4 Address . . . . . . . . . . . : 192.168.1.42 | Local IP address on the current Wi‑Fi network | Yes |
| Wi‑Fi | Default Gateway . . . . . . . . . : 192.168.1.1 | Router address | No |
| Wi‑Fi | DNS Servers . . . . . . . . . . . : 192.168.1.1 | Name lookup server | No |
| Wi‑Fi | IPv6 Address . . . . . . . . . . . : fe80::d4a:3f2b:8c11:9b2a | IPv6 address, not the usual IPv4 value | No |
| Bluetooth Network Connection | Media State . . . . . . . . . . . : Media disconnected | Inactive adapter | No |
| VirtualBox Host-Only Network | IPv4 Address . . . . . . . . . . . : 192.168.56.1 | Virtual adapter address | No, unless you need that adapter |
When Ethernet is active, the Ethernet adapter section should show the IPv4 address you use on that wired network. When a VPN is active, the VPN adapter may show its own address, which is not the same thing as your home or office LAN address.
Why the number you see may not be the one you want
A PC can have several network paths at once. The wrong address often comes from a VPN, a virtual adapter, or a disconnected connection. The fix is simple: match the adapter to the connection you are actually using, then read only that adapter’s IPv4 line.
VPN address versus home network address
A VPN creates its own network tunnel. That tunnel may show an IPv4 address inside ipconfig, but it is not the address your router assigned to Wi‑Fi or Ethernet. If you need your local LAN address, use the adapter that belongs to your active local connection.
Multiple adapters on one PC
Windows often lists Ethernet, Wi‑Fi, Bluetooth, virtual switches, and VPNs together. That is normal. The safest approach is to ignore any adapter that says Media disconnected or clearly does not match the network you are using.
After switching networks
Run ipconfig again after reconnecting Wi‑Fi, unplugging or plugging in Ethernet, or disconnecting a VPN. The IPv4 address can change when the connection changes, so the first value you saw may no longer be current.
What happens when Wi‑Fi, Ethernet, or VPN is active?
The active adapter changes the answer. Wi‑Fi usually shows the wireless adapter section. Ethernet usually shows the wired section. A VPN may add another section with its own address. The local IPv4 address you want is the one under the adapter that matches the connection in use right now.
- Check the adapter name.
- Confirm whether Wi‑Fi, Ethernet, or VPN is connected.
- Read the IPv4 Address line under that same adapter.
Example patterns:
Wi-Fi adapter
IPv4 Address . . . . . . . . . . . : 192.168.1.42
Ethernet adapter
IPv4 Address . . . . . . . . . . . : 10.0.0.18
VPN adapter
IPv4 Address . . . . . . . . . . . : 10.8.0.6
How do you find your IP address without Command Prompt?
Use Windows network settings if Command Prompt is blocked or unavailable. Open Settings > Network & internet > Properties on Windows 10 or Windows 11, or use the adapter details in Control Panel on older systems. These paths show the same local network information without needing CMD.
Settings path
- Open Settings > Network & internet.
- Select Wi‑Fi or Ethernet.
- Open Properties and read the IPv4 details.
Control Panel path
- Open Control Panel > Network and Sharing Center.
- Select your active connection.
- Choose Details and read the IPv4 address.
If a school or locked computer blocks Command Prompt, these menus are the cleanest fallback. Administrator access is not usually needed for either one.
Common mistakes
The biggest mistake is copying the public IP from a browser search or router page when the goal is the local IPv4 address. Another common error is reading the VPN adapter or a disconnected virtual switch. A third is assuming ipconfig needs administrator access for a normal lookup.
- Wrong adapter: Match the section name to your active connection.
- Public IP copied by mistake: Use the IPv4 Address line from
ipconfig, not a website result. - Old value after reconnecting: Run
ipconfigagain after switching networks. - Locked-down PC: Use Settings > Network & internet > Properties or Control Panel > Network and Sharing Center > Details.
If that didn't work, try this next
If ipconfig still looks confusing, move one step deeper. First refresh the network state. If that does not help, reset the adapter or network stack. These are heavier fixes than reading the IPv4 line, and they are only worth using when the adapter details are stale or broken.
- Open Command Prompt and run
ipconfig /release, thenipconfig /renew. - Run
ipconfig /flushdnsif name lookups feel stale, though this does not change the local IPv4 address. - If the adapter still looks wrong, open Settings > Network & internet > Advanced network settings > Network reset.
- If the network stack seems damaged, run these commands in order:ipconfig /release
ipconfig /flushdns
ipconfig /renew
netsh winsock reset
netsh int ip reset - If the adapter still misbehaves, open Device Manager > Network adapters > (adapter) > Uninstall device, then scan for hardware changes.
Recheck ipconfig after any reset. The IPv4 address can change once Windows reconnects.
Prevention: When the network changes, run ipconfig again before you copy the address into a router, printer, or remote-access form.
how to use command prompt to find ip address
Open Command Prompt with Win + R, type cmd, press Enter, then run ipconfig. Read the IPv4 Address line under the adapter that matches your current connection. Ignore disconnected adapters, VPN-only sections, and any public IP you may see elsewhere.
how to use command prompt to check ip address
Use ipconfig in Command Prompt, then compare the adapter name with your active connection. On Wi‑Fi, look in the wireless section; on Ethernet, look in the wired section. The local IP is the IPv4 line, not the gateway, DNS server, or IPv6 value.
how to use command prompt to get ip address
Type ipconfig and press Enter. If multiple adapters appear, choose the one that is connected right now. If a VPN is active, its adapter may show a different address, so confirm the section name before copying anything into another device or form.
how to use command prompt to find my ip address
Launch Command Prompt from Start or Win + R, run ipconfig, and read the IPv4 Address line. That is the local address most people need for printer setup, router rules, and LAN troubleshooting. Administrator access is not needed for this check.
what to type in command prompt to find ip address
Type ipconfig. That is the standard Windows command for a quick IP lookup. If you need the address after changing networks, run it again so you do not copy an old value from Wi‑Fi, Ethernet, or a VPN session.
how to find ip address without command prompt
Use Settings > Network & internet > Properties on Windows 10 or Windows 11, or use Control Panel > Network and Sharing Center > Details on older systems. Both paths show the active adapter’s IPv4 information without opening CMD.
how to find ip address in windows 7 without command prompt
Open Control Panel > Network and Internet > Network and Sharing Center, select your active connection, and open Details. The IPv4 line in that window is the local address. If the Start menu search is available, cmd still works as a faster route.