Open Command Prompt and run the right command

To see your IP address in Command Prompt, open the program and type ipconfig, then press Enter. This single command shows every network connection on your computer — your main internet connection, any virtual networks, and connections you're not actively using. Your IPv4 Address is the one you need in most situations; it looks like four numbers separated by dots, such as 192.168.1.5.

If you want only the information you're looking for without the extra details, type ipconfig | findstr "IPv4" and press Enter. This filters the results to show just the IPv4 addresses on your machine. The pipe symbol (|) tells Command Prompt to take the output from ipconfig and search through it for lines containing "IPv4".

Command Prompt is built into Windows and requires no installation. On Windows 10 or 11, press the Windows key, type "cmd", and click Command Prompt from the results. On older Windows versions, go to Start > All Programs > Accessories > Command Prompt.

Key Takeaways

  • Type ipconfig in Command Prompt to see all network addresses on your computer, including your IPv4 address.
  • Your IPv4 address is the standard internet address and appears as four numbers separated by dots, like 192.168.1.100.
  • Use ipconfig | findstr "IPv4" to see only IPv4 addresses without the extra network information.
  • Command Prompt is included with Windows and opens by pressing the Windows key, typing "cmd", and clicking the result.
  • The address shown under "IPv4 Address" is usually your local network address; your public internet address (seen by websites) is different.

Understanding what ipconfig actually shows you

When you run ipconfig, you see multiple sections, each representing a different network adapter on your computer. Most people have at least two: an Ethernet adapter (if you use a cable) or a wireless adapter (if you use WiFi), and often a virtual adapter created by software like Docker or VirtualBox. Each one has its own IP address.

The address listed under "IPv4 Address" is your local IP address — the one your home router assigned to your computer. This is what other devices on your home network use to find you. It is not the address that websites see when you visit them. Websites see your public IP address, which is assigned by your internet service provider to your router. You cannot see your public IP in Command Prompt; you need to visit a website like whatismyipaddress.com to find it.

The "Subnet Mask" and "Default Gateway" shown in ipconfig output are also important for network setup, but most people do not need to change them. The subnet mask defines which devices are on your local network, and the default gateway is your router's address.

Checking a specific network adapter

If you have multiple network adapters and want to see details for only one, you can use ipconfig /all to get the full picture. This shows the adapter name, MAC address (a unique identifier for your network card), DHCP status, and DNS servers — information you might need if a technician asks for it or if you are troubleshooting a connection problem.

To see information for just your active connection, use ipconfig | findstr /A:2 "Adapter". This highlights the adapter names so you can identify which section belongs to which connection. If you know the adapter name (such as "Ethernet" or "WiFi"), you can look for that specific section in the ipconfig output.

Renewing your IP address from Command Prompt

Sometimes your computer holds onto an old IP address even though your router has assigned a new one. To force your computer to ask the router for a fresh address, type ipconfig /release and press Enter, then type ipconfig /renew and press Enter. This tells your computer to give up its current address and request a new one from your router's DHCP server.

Releasing and renewing your IP address takes a few seconds and temporarily disconnects you from the network. You might lose internet for a moment, but the connection returns once the new address is assigned. This is a safe operation and does not affect any files or settings on your computer.

Running Command Prompt as administrator when needed

Most ipconfig commands work from a regular Command Prompt window. However, if you are trying to release and renew your IP address and get an error message, you may need to run Command Prompt as administrator. Right-click the Command Prompt icon and select "Run as administrator", then enter your password if Windows asks for it.

Administrator mode gives Command Prompt permission to change network settings. Without it, some network commands are blocked. If you are just checking your IP address with ipconfig, you do not need administrator access — a regular Command Prompt window is fine.

Troubleshooting when ipconfig does not show what you expect

If ipconfig shows "Media disconnected" under your adapter name, your network cable is unplugged or your WiFi is turned off. Plug in the cable or turn on WiFi, wait a few seconds, and run ipconfig again. The address should appear once the connection is active.

If ipconfig shows an address starting with 169.254 (called an APIPA address), your computer asked for an address from the router but did not get one. This usually means the router is not responding. Restart your router by unplugging it for 30 seconds, plugging it back in, and waiting for it to fully boot. Then run ipconfig /renew to request a new address.

If you see multiple IPv4 addresses listed, each one belongs to a different adapter. Look for the one under the adapter you are actually using — usually "Ethernet" if you have a cable plugged in, or "Wireless LAN adapter WiFi" if you are connected to WiFi.

Saving your IP information to a file

If you need to keep a record of your network settings, you can save the ipconfig output to a text file. Type ipconfig /all > network_info.txt and press Enter. This creates a file called network_info.txt in your user folder containing all the information ipconfig displays. You can open it in Notepad anytime to review your network settings.

This is useful if you need to send network information to a technician or keep a record before making changes to your network. The file contains everything ipconfig shows, including adapter names, IP addresses, MAC addresses, and DNS settings.

Frequently Asked Questions

What is the difference between IPv4 and IPv6?

IPv4 is the older standard and uses addresses made of four numbers (like 192.168.1.1). IPv6 is the newer standard and uses longer addresses with letters and numbers (like 2001:0db8:85a3:0000:0000:8a2e:0370:7334). Most home networks still use IPv4, but IPv6 is becoming more common. If you see both in ipconfig, your computer supports both standards.

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

No. Your local IP address (shown in ipconfig) is only used within your home network. Your public IP address is what websites see and is assigned by your internet service provider. To find your public IP, visit a website like whatismyipaddress.com in your browser.

Why does my IP address change sometimes?

Most home routers assign addresses using DHCP, which means the address can change when you restart your computer or router. If you need a permanent address, you can set a static IP in your router settings, but this is rarely necessary for everyday use.

Can I change my IP address from Command Prompt?

You can release and renew it (which may give you a different address), but to set a specific permanent address, you need to change your network settings in Windows Settings or your router's admin panel, not in Command Prompt.

What should I do if ipconfig shows no IP address at all?

First, check that your network cable is plugged in or WiFi is turned on. If it is, restart your router and run ipconfig /renew. If you still see no address, restart your computer. If the problem continues, your network adapter may need a driver update or replacement.