Finding your IP address depends on your operating system

Your IP address is displayed differently on Windows, Mac, and Linux, but the process takes less than a minute on any of them. The fastest route is usually the command line — a text-based tool built into every operating system — though you can also find it through your network settings if you prefer clicking through menus.

You have two IP addresses on your computer right now: a local IP address (the one your home network assigns to your device) and a public IP address (the one your internet service provider assigns to your home). Most of the time, when someone asks for your IP address, they mean the local one. The public one is what websites see when you visit them.

Key Takeaways

  • On Windows, open Command Prompt and type ipconfig to see your local IP address listed as "IPv4 Address".
  • On Mac, open Terminal and type ifconfig to find your local IP address under "inet" in the section labeled with your network name.
  • On Linux, open Terminal and type ip addr or ifconfig to display your local IP address.
  • Your public IP address appears on websites like whatismyipaddress.com, but your local IP address is what you need to connect to devices on your home network.
  • If you need your IP address for a specific task — connecting to a printer, accessing a security camera, or troubleshooting a network problem — ask the device or service what format it needs.

Finding your local IP address on Windows

Open Command Prompt by pressing the Windows key, typing "cmd", and pressing Enter. A black text window will open. Type ipconfig and press Enter. Your local IP address appears on the line labeled "IPv4 Address" and usually starts with 192.168 or 10.0.

If you prefer not to use Command Prompt, you can find the same information through Settings. Go to Settings > Network & Internet > Wi-Fi (or Ethernet if you are wired), select your network, and scroll down to "IP address". The number shown there is your local IP address.

Finding your local IP address on Mac

Open Terminal by pressing Command + Space, typing "terminal", and pressing Enter. Type ifconfig and press Enter. Look for the section labeled with your network name (usually "en0" for Ethernet or "en1" for Wi-Fi). Your local IP address is on the line that starts with "inet" and usually begins with 192.168 or 10.0.

Alternatively, go to System Settings > Network, select your active connection (Wi-Fi or Ethernet), and click "Details". Your local IP address appears in the window that opens, listed as "IPv4 Address".

Finding your local IP address on Linux

Open Terminal and type ip addr and press Enter. Your local IP address appears next to "inet" in the section for your active network connection. If that command does not work on your system, try ifconfig instead — the output is similar but formatted slightly differently.

Some Linux distributions do not include these tools by default. If you see a "command not found" message, your system may require you to install network utilities first. Check your distribution's documentation for the exact package name.

Understanding what you are looking at

The IP address you find using these methods is your local IP address — the address your home router assigns to your computer. It stays the same as long as your computer is on the same network, though it can change if you restart your router or your computer is offline for a long time. This is the address you use when connecting to other devices on your home network, like a printer, security camera, or network storage drive.

Your public IP address is different. It is assigned by your internet service provider and is what websites see when you visit them. To find your public IP address, visit a site like whatismyipaddress.com or search "what is my IP" in any search engine. Your public IP address changes less often than your local one — usually only when you restart your modem or after several days of being offline.

When you need your local IP address versus your public one

You need your local IP address when you are connecting to something on your home network: setting up a printer, accessing a security camera, connecting to a network drive, or troubleshooting a device that is not responding. If someone on your home network asks for your IP address, they want the local one.

You need your public IP address when a website or online service asks for it, or when you are troubleshooting internet connectivity with your service provider. Your public IP address is also what appears in your router's logs and what websites record in their access logs. If you are concerned about privacy, your public IP address is the one that can be traced back to your location and service provider.

Troubleshooting if the commands do not work

If you type the command and nothing appears, make sure you pressed Enter after typing it. If you see "command not found", you may be using a different operating system than you think, or the network tools are not installed. Try restarting Terminal and typing the command again.

If the command runs but you see multiple IP addresses listed, look for the one that matches your network setup. If you are connected by Wi-Fi, look in the section labeled with "Wi-Fi" or "en1" on Mac, or "wlan0" on Linux. If you are connected by Ethernet cable, look in the section labeled "Ethernet" or "en0" on Mac, or "eth0" on Linux. Ignore any addresses that start with 127.0.0.1 — that is your computer talking to itself, not your network address.

Frequently Asked Questions

Why do I have two different IP addresses?

Your local IP address is assigned by your home router to identify your computer on your home network. Your public IP address is assigned by your internet service provider to identify your entire home network on the internet. Websites see your public IP; devices on your home network see your local IP.

Will my IP address change if I restart my computer?

Your local IP address usually stays the same after a restart, though it can change if your router reassigns addresses. Your public IP address rarely changes from a single restart — it typically only changes when you restart your modem or after your computer has been offline for several days.

Is it safe to share my IP address?

Sharing your local IP address with someone on your home network is safe — they need it to connect to your devices. Sharing your public IP address is generally safe for most purposes, though it does reveal your approximate location and service provider. Avoid sharing it with untrusted sources or posting it publicly online.

What if I cannot find the IP address in the output?

Make sure you are looking at the right network connection. If you are on Wi-Fi, ignore sections labeled "Ethernet" or "eth0". Look for a line that starts with "inet" (on Mac or Linux) or "IPv4 Address" (on Windows) and contains four numbers separated by periods, like 192.168.1.100.