How to find your IP address in Command Prompt

Open Command Prompt and type ipconfig, then press Enter. Your IP address appears next to "IPv4 Address" in the results. On Windows, this is the fastest way to see what address your device is using on your network right now.

Command Prompt is built into Windows — you do not need to install anything. Press the Windows key, type "cmd", and select "Command Prompt" from the results. A black window opens. Type the command exactly as shown, with no extra spaces or capitals, and the information displays when ready.

The output shows several network adapters if your device has more than one (for example, both Wi-Fi and Ethernet). Look for the one you are actually using. If you are connected by Wi-Fi, find the adapter labeled "Wireless LAN adapter" or "Wi-Fi". If you are plugged in with a cable, look for "Ethernet adapter".

Key Takeaways

  • Type ipconfig in Command Prompt and press Enter to see your device's IP address next to "IPv4 Address".
  • Your IP address tells you what number your device has on your home network, which is different from your internet-facing address.
  • If you have multiple network adapters, find the one labeled with the connection type you are using (Wi-Fi or Ethernet).
  • The address shown is your local IP — it only works on your home network, not on the internet.

Understanding what ipconfig shows you

The ipconfig command displays four pieces of information for each network adapter: the IPv4 Address, Subnet Mask, Default Gateway, and DHCP Server. For most home network tasks, you only need the IPv4 Address — that is the number that identifies your device on your network.

The IPv4 Address looks like four numbers separated by dots: for example, 192.168.1.105. The first three numbers usually stay the same for all devices on your network (your router assigns them). The last number changes from device to device. This is why it is called a "local" IP address — it only works inside your home network.

The Subnet Mask (usually 255.255.255.0 on home networks) tells devices which addresses are on the same network as them. The Default Gateway is your router's address — the device that connects your home network to the internet. You may need the gateway address if you are troubleshooting network problems or logging into your router.

Finding your internet-facing IP address instead

If you need the IP address that the outside internet sees (your public IP address), ipconfig does not show it. Instead, type ipconfig /all in Command Prompt and look for "IPv6 Address" if your internet provider supports it, but most home networks still use IPv4 only.

The easiest way to find your public IP is to open a web browser and search "what is my IP". Any search engine will display it at the top of the results. This is the address that websites and online services see when you connect to them. It is different from your local IP address because your router translates between the two.

Your public IP address changes periodically — sometimes weekly, sometimes monthly, depending on your internet provider. Your local IP address on your home network is usually more stable, though it can change if you restart your router or if your device reconnects to the network.

Other ipconfig commands that show network details

Type ipconfig /all to see extended information about every network adapter, including the physical address (called the MAC address), DNS servers, and DHCP lease times. This is useful if you are setting up port forwarding on your router or troubleshooting why a device cannot connect.

Type ipconfig /release followed by ipconfig /renew if your device has an IP address that is not working correctly. This tells your router to forget the old address and assign a new one. Wait a few seconds between the two commands. This fixes many connection problems without restarting your device.

Type ipconfig /flushdns if websites are loading slowly or showing old versions. This clears the list of website addresses your computer has cached, forcing it to ask your router for fresh information. It is a common troubleshooting step when a website has moved to a new server.

Why you might need your local IP address

Your local IP address is necessary when you are setting up devices on your home network. If you are configuring port forwarding on your router to let outside traffic reach a specific device, you need that device's local IP address. If you are logging into a printer or security camera on your network, you type its IP address into your browser's address bar.

Knowing your device's IP address also helps when troubleshooting network problems. If a device cannot reach the internet but can reach other devices on your network, the issue is usually between your device and the router. If a device cannot reach other devices on the network, the problem is often that it has the wrong IP address or is on a different network entirely.

Some devices (like servers or network printers) benefit from a static IP address — one that does not change when you restart. Your router's settings let you assign a static address to a device based on its MAC address, which you can find using ipconfig /all.

Saving your IP address information

If you need to keep a record of the information ipconfig shows, type ipconfig > network_info.txt and press Enter. This saves all the output to a text file on your desktop called "network_info.txt". You can open it in Notepad anytime to check the details without running the command again.

You can also take a screenshot of the Command Prompt window by pressing Alt+Print Screen, then paste it into a document. This is useful if you are troubleshooting with technical support and need to show them your network configuration.

Frequently Asked Questions

Is my local IP address the same as my public IP address?

No. Your local IP address (like 192.168.1.105) only works on your home network. Your public IP address is what websites see when you connect to the internet. Your router translates between them. You can find your public IP by searching "what is my IP" in a web browser.

Why does my IP address keep changing?

Your router assigns local IP addresses automatically using DHCP. Most devices keep the same local address for weeks or months, but it can change if you restart your router or if your device reconnects. If you need a device to always have the same address, you can set a static IP in your router's settings.

Can I use ipconfig on a Mac or Linux computer?

No, ipconfig is Windows-only. On a Mac, open Terminal and type ifconfig. On Linux, type ip addr. Both commands show the same information as ipconfig, just in a different format.

What should I do if ipconfig shows no IPv4 address?

This usually means your device is not connected to the network or the connection failed. Check that you are connected to Wi-Fi or that your Ethernet cable is plugged in. If you are connected but still see no address, try restarting your device or running ipconfig /renew to request a new address from your router.

Do I need to run Command Prompt as administrator to use ipconfig?

No. The basic ipconfig command works for any user. Some advanced commands like ipconfig /release may require administrator access on some Windows versions, but you will get an error message if that is the case — just right-click Command Prompt and select "Run as administrator".