What Your IP Address Is and Why You Need It

Your computer's IP address is a set of numbers that identifies your device on a network — like a mailing address for data. It looks like four numbers separated by dots: 192.168.1.5 or similar. You need to know your IP address when you're troubleshooting network problems, setting up a printer on your home network, connecting to a remote computer, or giving tech support someone the information they're asking for.

There are two types of IP addresses you might encounter. Your local IP address (also called private IP) is what your device uses inside your home or office network. Your public IP address is what the internet sees when you browse — it's assigned by your internet service provider. This guide covers finding both.

Key Takeaways

  • Your local IP address appears when you open Command Prompt (Windows), Terminal (Mac), or a terminal window (Linux) and run a specific command.
  • Windows users type ipconfig, Mac users type ifconfig or ipconfig getifaddr en0, and Linux users type ip addr or hostname -I.
  • Your public IP address is visible on websites like whatismyipaddress.com or by searching "what is my IP" in any browser.
  • The local IP address you need usually starts with 192.168 or 10.0 and appears next to "IPv4 Address" in Windows or "inet" in Mac and Linux.

Finding Your Local IP Address on Windows

Open the Command Prompt window. Press the Windows key, type cmd, and press Enter. A black window will open with a blinking cursor.

Type ipconfig and press Enter. A list of information will appear. Look for the section labeled "Ethernet adapter" or "Wireless LAN adapter" — whichever one you're using to connect to the network. Next to "IPv4 Address" you'll see a number like 192.168.1.5. That's your local IP address. Write it down or take a screenshot.

If you see multiple adapters listed, find the one that shows an IPv4 address starting with 192.168 or 10.0. Ignore any that show 127.0.0.1 — that's your computer talking to itself and not useful for network purposes.

Finding Your Local IP Address on Mac

Open Terminal. Press Command and Space together, type terminal, and press Enter. A white window will open.

Type ifconfig | grep inet and press Enter. You'll see several lines of output. Look for a line that starts with "inet" followed by a number like 192.168.1.10. That's your local IP address. If you see multiple inet lines, the one you want usually appears under "en0" or "en1" and starts with 192.168 or 10.0.

Alternatively, you can find this information without the terminal. Click the Apple menu, select System Settings, then click Network on the left side. Select your active connection (Wi-Fi or Ethernet) and your IP address will appear under "IPv4 Address."

Finding Your Local IP Address on Linux

Open a terminal window. The method varies by distribution, but usually you can right-click on the desktop and select "Open Terminal Here," or search your applications menu for Terminal.

Type ip addr and press Enter. You'll see output showing each network adapter. Look for a section labeled "inet" followed by a number and a slash — for example, 192.168.1.15/24. The number before the slash is your local IP address. Ignore any line showing 127.0.0.1, which is your computer's internal loopback address.

If ip addr doesn't work on your system, try hostname -I instead. This will display your IP address more simply, though it may show multiple addresses if you have multiple network connections.

Finding Your Public IP Address

Your public IP address is what websites see when you visit them. To find it, open any web browser and search for "what is my IP address" or visit a site like whatismyipaddress.com. The large number displayed on the page is your public IP address.

You can also find this information from the command line. On Windows, open Command Prompt and type curl ifconfig.me. On Mac or Linux, open Terminal and type the same command. Your public IP address will appear on the next line.

Your public IP address changes periodically — sometimes daily, sometimes weekly, depending on your internet service provider. Your local IP address usually stays the same as long as you stay connected to the same network.

Understanding What You're Looking At

IP addresses have a specific format. Each number in the address is between 0 and 255. Local IP addresses almost always start with 192.168, 10.0, or 172.16 — these ranges are reserved for private networks. Public IP addresses can be any other combination.

You might also see something called a subnet mask next to your IP address. It looks like 255.255.255.0. This tells your computer which other devices are on the same local network as you. You don't usually need to change this, but it's useful information if you're troubleshooting network connectivity.

If you're setting up a device like a printer or security camera, you'll typically enter your local IP address into a web browser (like 192.168.1.5 in the address bar) to access that device's settings. Your public IP address is what you'd use if you wanted to access your home network from outside your home, though that requires additional security setup.

What To Do If You Can't Find Your IP Address

If the commands above don't show an IP address, or if you see only 169.254.x.x, your computer isn't connected to the network properly. Check that your ethernet cable is plugged in or that you're connected to the correct Wi-Fi network.

Restart your computer and try again. Sometimes a network connection needs a moment to establish. If you're on Wi-Fi, move closer to the router and check that the Wi-Fi icon shows you're connected.

If you're still not seeing an IP address after restarting, your network adapter may not be working. Try unplugging your router for 30 seconds and plugging it back in. If that doesn't help, you may need to check your router's settings or contact your internet service provider.

Frequently Asked Questions

Can I change my IP address?

Your local IP address can be changed through your router's settings, but most people don't need to. Your public IP address is assigned by your internet service provider and changes on its own schedule. If you need a different public IP address for privacy reasons, you would use a VPN service, which is a separate tool.

Is my IP address the same as my MAC address?

No. Your IP address is a network address (like 192.168.1.5). Your MAC address is a hardware address unique to your network adapter (like 00:1A:2B:3C:4D:5E). They serve different purposes. The commands above show your IP address, not your MAC address.

Why do I see multiple IP addresses when I run these commands?

You may have multiple network adapters — for example, both Wi-Fi and Ethernet. Each one gets its own IP address. Use the one that corresponds to the connection you're actually using. If you're on Wi-Fi, look for the address under the Wi-Fi adapter section.

Is it safe to share my IP address?

Sharing your public IP address is generally safe — websites already know it when you visit them. Your local IP address is only visible to devices on your home network, so sharing it with someone helping you troubleshoot is fine. Never share passwords or other sensitive information, but the IP address itself isn't a security risk.

What if my IP address keeps changing?

Your local IP address should stay the same while you're on the same network. If it keeps changing, your router may not be set to assign a static address to your device. Your public IP address naturally changes over time — this is normal and controlled by your internet service provider, not something you need to fix.