Open Command Prompt and run a single command to see your IP address

The fastest way to find your IP address is to open Command Prompt and type ipconfig, then press Enter. Windows will display your IP address, subnet mask, and default gateway in seconds. This works on any Windows computer without installing anything extra.

Command Prompt is a text-based tool built into Windows that lets you run system commands directly. It is not the same as PowerShell or the newer Terminal app, though those work too. Most people find Command Prompt the simplest route because it has been in Windows for decades and the command names are straightforward.

Key Takeaways

  • Type ipconfig in Command Prompt to see your local IP address, the one your router assigned to your device.
  • Type ipconfig /all to see additional details like your MAC address, DHCP server, and DNS settings.
  • Your local IP address (usually starting with 192.168 or 10.0) is different from your public IP address, which is what websites see.
  • Command Prompt is built into Windows and requires no downloads or administrator permission to view your IP address.

How to open Command Prompt on Windows

Press the Windows key and type cmd, then click "Command Prompt" when it appears in the search results. The window will open to a black screen with a blinking cursor. You are now ready to type commands.

Alternatively, you can right-click the Start button and select "Terminal" or "Command Prompt" from the menu. On older Windows versions, you can navigate to Start > All Programs > Accessories > Command Prompt. All three routes open the same tool.

You do not need administrator privileges to view your IP address. If Command Prompt asks for permission, you can click "No" and continue — the ipconfig command works either way.

Running ipconfig to see your local IP address

Type ipconfig and press Enter. Command Prompt will display a list of network adapters on your computer. Look for the section labeled "Ethernet adapter" if you are plugged in with a cable, or "Wireless LAN adapter" if you are using WiFi.

Under that adapter, you will see "IPv4 Address" followed by a number like 192.168.1.105 or 10.0.0.50. That is your local IP address — the one your router assigned to your device. Below that, "Default Gateway" shows your router's IP address, usually 192.168.1.1 or 10.0.0.1.

If you have multiple network adapters (for example, both Ethernet and WiFi), ipconfig shows all of them. Only the one you are actually using will have an IPv4 address. The others will show "Media disconnected" or no address at all.

Getting more details with ipconfig /all

Type ipconfig /all to see extended information about your network setup. This command shows your MAC address (a unique identifier for your network card), your DHCP server (the device handing out IP addresses, usually your router), and your DNS servers (the computers translating domain names into IP addresses).

The /all flag also displays "DHCP Enabled" (yes or no), "Lease Obtained" and "Lease Expires" (the dates your current IP address is valid), and "DNS Suffix Search List" (the domain names your computer searches automatically). Most people do not need this information for everyday use, but it is helpful if you are troubleshooting network problems or setting up a new device.

The output is longer than a regular ipconfig command, so you may need to scroll up in the Command Prompt window to see everything. Right-click the title bar and select "Properties" if you want to make the window larger or change the font size.

Understanding the difference between local and public IP addresses

The IP address ipconfig shows you is your local IP address — the one your router uses to identify your device on your home network. Websites and online services do not see this address. Instead, they see your public IP address, which is assigned by your internet service provider and is the same for all devices in your home.

Your local IP address stays the same most of the time because your router remembers which device it belongs to. Your public IP address can change whenever your router restarts or your ISP reassigns it, which may happen weekly, monthly, or not at all depending on your provider.

If you need to find your public IP address, you cannot do it from Command Prompt alone. You would need to visit a website like whatismyipaddress.com or search "what is my IP" in a web browser. That website will show you the address that the internet sees.

Troubleshooting when ipconfig shows no IP address

If ipconfig shows "Media disconnected" or no IPv4 address, your device is not connected to the network. Check that your Ethernet cable is plugged in or that you are connected to your WiFi network. Then run ipconfig again.

If you are connected but still see no address, your router may not be handing out IP addresses correctly. Restart your router by unplugging it for 30 seconds, then plugging it back in. Wait two minutes for it to fully boot, then run ipconfig again.

If the problem continues, you can force your device to request a new IP address by typing ipconfig /release followed by ipconfig /renew. This tells your router to forget your old address and assign you a new one. Most devices reconnect within a few seconds.

Other Command Prompt commands for network information

ipconfig /displaydns shows a list of domain names your computer has recently looked up and the IP addresses it found. This is useful if a website is not loading and you want to check whether your computer is translating the domain name correctly.

ping followed by a website name (for example, ping google.com) sends a test message to that website and shows whether it responds. If the ping fails, your internet connection may be down or the website may be unreachable. If it succeeds, the website is online and your connection is working.

tracert followed by a website name (for example, tracert google.com) shows the path your data takes to reach that website, hopping through multiple servers along the way. This helps identify where a connection is breaking down if a website is slow or unreachable.

Frequently Asked Questions

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

No. Your local IP address (shown by ipconfig) is only used on your home network. Your public IP address is what websites see and is assigned by your internet service provider. To find your public IP, search "what is my IP" in a web browser.

Will my IP address change if I restart my computer?

Usually not. Your router remembers which device you are and assigns you the same local IP address each time you connect. Your public IP address may change if your router restarts, but this depends on your ISP's settings and may not happen for months.

Can I change my IP address from Command Prompt?

You can request a new one using ipconfig /release and ipconfig /renew, but your router will usually assign you a similar address in the same range. To set a permanent static IP address, you would need to change your network settings in Windows or your router's admin panel.

What if Command Prompt says "ipconfig is not recognized"?

This is rare on Windows but can happen if Command Prompt is looking in the wrong folder. Try typing the full path: C:\Windows\System32\ipconfig. If that does not work, restart your computer and try again.

Do I need administrator access to run ipconfig?

No. The ipconfig command works for any user account. Some advanced commands like ipconfig /release require administrator access, but viewing your IP address does not.