Your IP address is a number your computer uses to connect to the internet and other devices on your network
Every device that connects to the internet has an IP address — a unique identifier that lets your computer send and receive data. You have two types: a local IP address that identifies your machine on your home or office network, and a public IP address that identifies your connection to the wider internet. Finding either one takes less than a minute and requires no special software.
The method depends on whether you use Windows, Mac, or Linux, and whether you want your local address (the one your router assigns) or your public address (the one websites see). Both are useful for different reasons — your local IP helps you troubleshoot network problems or set up devices at home, while your public IP is what you need if you're diagnosing internet connectivity issues or checking your location.
Key Takeaways
- On Windows, open Command Prompt and type ipconfig to see your local IP address listed as "IPv4 Address".
- On Mac, go to System Settings, click Network, select your connection, and your local IP appears under "IP Address".
- On Linux, open a terminal and type hostname -I or ip addr to display your local IP address.
- To find your public IP address on any device, visit a website like whatismyipaddress.com or type "what is my ip" into a search engine.
- Your local IP address usually starts with 192.168 or 10.0, while your public IP is the address your internet service provider assigns to your connection.
Finding your local IP address on Windows
The fastest way on Windows is through Command Prompt. Press the Windows key, type cmd, and press Enter. A black window opens. Type ipconfig and press Enter. Your local IP address appears next to "IPv4 Address" — it usually looks like 192.168.1.100 or 10.0.0.50.
If you prefer not to use Command Prompt, you can find it through Settings. Click the Windows Start button, go to Settings, select Network & Internet, then choose your connection type (Wi-Fi or Ethernet). Your local IP appears under "IP address" in the details section. This method takes slightly longer but shows the same information.
The number you see is what your router assigned to your computer. It only works on your local network — devices outside your home cannot reach you using this address. If you need to set up a printer, connect a gaming console, or troubleshoot a network problem, this is the address you use.
Finding your local IP address on Mac
On 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 the connection you are using — either Wi-Fi or Ethernet — and your local IP address appears in the main panel next to "IP Address".
The address follows the same format as Windows: usually 192.168.x.x or 10.0.x.x. This is the address your router assigned to your Mac, and it is what you use to connect to other devices on your home network. If you change networks or restart your router, this address may change.
Finding your local IP address on Linux
On Linux, open a terminal window. Type hostname -I and press Enter. Your local IP address appears when ready. Alternatively, type ip addr and press Enter to see more detailed network information. Look for the line that starts with "inet" under your active connection — the number after "inet" is your local IP address.
If you use a graphical desktop environment like GNOME or KDE, you can also find this information through the network settings menu, though the terminal method is faster and works on any Linux system.
Finding your public IP address
Your public IP address is what the internet sees when your computer connects to websites or services. To find it, open any web browser and visit a site like whatismyipaddress.com, myip.com, or iplocation.net. Your public IP appears when ready at the top of the page. You can also type "what is my ip" into Google or another search engine — the answer appears in the search results without clicking anything.
Your public IP is assigned by your internet service provider and is shared by all devices on your home network. Websites, online services, and internet tools use this address to identify your connection. Unlike your local IP, which you control through your router, your public IP changes periodically — sometimes daily, sometimes monthly, depending on your ISP.
If you need to check your public IP from the command line on Windows, Mac, or Linux, you can type curl ifconfig.me in a terminal or Command Prompt. This returns your public IP address without opening a browser.
Understanding the difference between local and public IP addresses
Your local IP address is assigned by your router and only works on your home or office network. It lets your computer talk to your printer, smart TV, or other devices connected to the same Wi-Fi or Ethernet. If you try to use your local IP address from outside your network, it will not work — the address is private and invisible to the internet.
Your public IP address is assigned by your internet service provider and is visible to every website and service you connect to. It identifies your entire home network to the outside world. When you visit a website, that site sees your public IP, not your local IP. This is why websites can sometimes guess your approximate location — they use your public IP to look up which city your ISP serves.
You need your local IP to set up devices at home or troubleshoot network problems. You need your public IP to diagnose internet connectivity issues, check if a service is blocking your connection, or verify your location for security purposes.
What to do if your IP address keeps changing
Both local and public IP addresses can change. Your local IP usually stays the same as long as your device stays connected to the same network, but it may change if you restart your router or if your router's settings are configured to reassign addresses frequently. Your public IP changes based on your ISP's policy — some change it daily, others monthly or less often.
If you need a stable local IP address for a device like a printer or server, you can set a static IP through your router's settings. Most routers have an option to "reserve" an IP address for a specific device, which prevents it from changing. If you need a stable public IP, contact your ISP — some plans offer a static public IP for an additional fee, though this is uncommon for residential connections.
Frequently Asked Questions
Is my IP address the same as my MAC address?
No. Your IP address is a number that identifies your device on a network and changes based on which network you join. Your MAC address is a hardware identifier built into your network card that stays the same. Both are useful for different purposes — IP addresses route data across networks, while MAC addresses identify devices on the same local network.
Can someone find my location using my IP address?
Your public IP can reveal your approximate location — usually your city or region, sometimes more precisely. Your local IP cannot be seen from outside your network, so it reveals nothing. If you want to hide your public IP, you can use a VPN service, which routes your traffic through another server and shows that server's IP address instead of yours.
Why do I have multiple IP addresses listed in ipconfig or ip addr?
Most computers have more than one network interface — for example, both Wi-Fi and Ethernet. Each interface gets its own local IP address. You also see a loopback address (usually 127.0.0.1) which your computer uses to talk to itself. Use the address that matches the connection you are actually using.
What if I cannot find my IP address using these methods?
Make sure your device is connected to the network. If you are on Wi-Fi, check that you are connected to the correct network. If you are on Ethernet, make sure the cable is plugged in. On Windows, try running Command Prompt as administrator. On Mac and Linux, make sure you typed the command correctly and pressed Enter.
Is it safe to share my IP address?
Sharing your public IP address carries minimal risk — websites already see it every time you visit. Sharing your local IP address is only useful to people on your home network. However, do not share either address with someone you do not trust, as they could use it to attempt network attacks or harassment.