Finding Your IP Address Using Command Prompt or Terminal

The fastest way to see your IP address is to open a command-line tool and run a single command. On Windows, this takes about 30 seconds. On Mac, it takes slightly longer because you navigate through System Settings first, but both methods show you the same information.

On a Windows PC, press the Windows key and type cmd, then press Enter. A black window opens. Type ipconfig and press Enter. Look for the line that says "IPv4 Address" — that number (usually four groups of digits separated by periods, like 192.168.1.5) is your local IP address, the one your home network uses to identify your computer.

On a Mac, open Terminal by pressing Command + Space, typing terminal, and pressing Enter. Type ifconfig and press Enter. Scroll down until you see "inet" followed by a number — that is your local IP address. Close the Terminal window when you are done.

Key Takeaways

  • Your local IP address (the one your home network assigns) appears when you run ipconfig on Windows or ifconfig on Mac in the command line.
  • Your public IP address (the one the internet sees) is different from your local address and can be found by visiting a website like whatismyipaddress.com in any web browser.
  • Local IP addresses usually start with 192.168 or 10.0 and change only when you restart your router or manually reassign them.
  • Public IP addresses are assigned by your internet service provider and may change periodically unless you pay for a static IP.

Finding Your Public IP Address in a Web Browser

Your public IP address is what websites and online services see when you connect to them. It is different from your local IP address. To find it, open any web browser and visit whatismyipaddress.com or ipchicken.com. The page displays your public IP address when ready — no installation or login required.

These websites work because they straightforward show you the address your computer is sending to them. The information appears within seconds. You can also search "what is my IP" in Google and the answer appears at the top of the search results.

Understanding Local Versus Public IP Addresses

A local IP address is assigned by your home router to your computer. It is only used within your home network and allows your router to send data to the right device. These addresses usually begin with 192.168 or 10.0. They do not change unless you restart your router, change your network settings, or your router reassigns addresses (which happens automatically on a schedule).

A public IP address is assigned by your internet service provider and is how the rest of the internet identifies your home network. When you visit a website, that website logs your public IP, not your local one. Your public IP may change periodically — sometimes weekly, sometimes monthly, depending on your provider — unless you pay for a static IP address that stays the same.

Most people need their local IP address when they are troubleshooting home network problems or setting up a device on their own network. You need your public IP address if you are reporting abuse, checking your location online, or setting up remote access to your computer from outside your home.

Checking Your IP Address in Windows Settings

If you prefer not to use Command Prompt, Windows Settings shows your local IP address through the graphical interface. Right-click the network icon in the bottom-right corner of your taskbar (it looks like a computer or WiFi symbol) and select Open Network & Internet settings.

Click WiFi or Ethernet depending on how you are connected. Then click the name of your network. Scroll down to the "IP settings" section. Your IPv4 address appears there. This method is slower than using Command Prompt but does not require typing commands.

Checking Your IP Address on Mac Through System Settings

On a Mac, click the Apple menu in the top-left corner and select System Settings (or System Preferences on older versions). Click Network in the sidebar. Select your connection type — WiFi or Ethernet — from the list on the left. Your local IP address appears in the main window next to "IPv4 Address."

This graphical method takes longer than opening Terminal and typing ifconfig, but some people find it easier to navigate. Both methods show the same information.

What to Do If Your IP Address Changes Unexpectedly

Local IP addresses change when your router restarts or when your router's DHCP server (the system that hands out addresses) reassigns them on its schedule. This is normal and usually happens every few days or weeks. If a device suddenly cannot reach another device on your network, the IP address may have changed — running ipconfig or checking System Settings will show the new address.

If your public IP address changes and you need it to stay the same, contact your internet service provider about purchasing a static IP address. This costs extra (usually $5 to $15 per month) but locks your public IP in place. Most home users do not need this unless they are running a server or need remote access from a fixed address.

Common Mistakes When Looking Up Your IP Address

The most common mistake is confusing your local IP with your public IP. If you run ipconfig and see 192.168.1.5, that is your local address — it only works on your home network. Websites and the internet cannot reach you at that address. You must visit a website like whatismyipaddress.com to see your public address.

Another mistake is assuming your IP address is permanent. Both local and public addresses can change. If you write down your IP address and try to use it weeks later, it may no longer be correct. If you need a permanent address for a device on your home network, you can set a static local IP in your router settings, but this requires logging into your router's admin panel.

Frequently Asked Questions

Is my IP address the same on WiFi and Ethernet?

No. If your computer is connected to both WiFi and Ethernet at the same time, it has a separate local IP address for each connection. Your public IP address is the same for both because it comes from your internet service provider and represents your entire home network, not individual devices.

Can someone find my location from my IP address?

Your public IP address can be traced to your internet service provider and your general geographic area (usually your city or region), but it does not reveal your exact street address or home location. Your local IP address cannot be traced by anyone outside your home network.

Why does my IP address show a different city than where I live?

IP address databases are not always current. Your internet service provider may route your connection through servers in a different city, or the database may have outdated information about which city an IP address belongs to. This is common and does not mean your connection is actually in that location.

Do I need to remember my IP address?

No. You can look it up whenever you need it using the methods in this guide. The only time you might write it down is if you are setting up a device on your home network and need to connect to it repeatedly, but even then you can look it up again if you forget.