Finding Your IP Address on Windows
The fastest way on Windows is to open the Command Prompt and type a single command. Press the Windows key, type cmd, and press Enter. When the black window opens, type ipconfig and press Enter. Look for the line that says "IPv4 Address" — that is your local IP address, the one your computer uses on your home or office network. It usually starts with 192.168 or 10.
If you need your public IP address instead — the one the internet sees when you browse — open any web browser and search for "what is my IP". Google will show it at the top of the results, or you can visit a site like whatismyipaddress.com. Your public IP is assigned by your internet service provider and changes periodically unless you pay for a static IP.
The Command Prompt method works on Windows 10 and Windows 11. If you are on an older version, the steps are the same.
Finding Your IP Address on Mac
On a Mac, open System Preferences (or System Settings on newer versions) and click Network. Your local IP address appears in the window under the connection you are using — Wi-Fi or Ethernet. It will be labeled "IPv4 Address" and look similar to a Windows address, starting with 192.168 or 10.
Alternatively, open Terminal (find it in Applications > Utilities) and type ifconfig, then press Enter. Scroll through the output and look for "inet" followed by a number — that is your local IP. The Terminal method shows more detail if you need it, but the System Settings route is simpler for most people.
For your public IP on Mac, the browser method works the same as Windows — search "what is my IP" in Safari or any browser.
Finding Your IP Address on Linux
Open a terminal window and type hostname -I, then press Enter. Your local IP address will appear on the next line. This works on most Linux distributions including Ubuntu, Fedora, and Debian.
If that command does not work, try ifconfig or ip addr show instead. Both will display your network information, though the output is longer and requires you to find the "inet" line. For your public IP, use the same browser search method as Windows and Mac.
Understanding Local vs. Public IP Addresses
Your local IP address is what your computer uses to talk to other devices on your home or office network — your printer, phone, router, and other computers nearby. It never leaves your network. These addresses always fall into a few ranges: 192.168.x.x, 10.x.x.x, or 172.16.x.x to 172.31.x.x. Your router assigns them automatically using DHCP, which means the address can change if you restart your computer or router.
Your public IP address is what websites and online services see. It is assigned by your internet service provider and is unique to your internet connection, not your computer. If you move your computer to a different network, it gets a different public IP. Most people do not need to know their public IP unless they are troubleshooting a connection problem or setting up remote access.
Why You Might Need Your IP Address
You may need your local IP address to connect a printer to your network, set up a device on your home network, or troubleshoot a connection problem. Some routers let you log in by typing your local IP into a browser — usually something like 192.168.1.1 — to change your Wi-Fi password or see what devices are connected.
Your public IP is useful if you are troubleshooting why a website is blocking you, checking your location as seen by the internet, or setting up remote access to your computer from another location. Some services also use it to detect unusual login activity.
What to Do If Your IP Address Keeps Changing
Local IP addresses change when your router restarts or when your computer reconnects to the network. If you need the same local IP every time — for example, to always reach a printer at the same address — you can set a static local IP in your router settings. Log into your router (usually at 192.168.1.1 in a browser), find the DHCP settings, and reserve an IP for your computer's device name or MAC address. The exact steps vary by router brand.
Public IP addresses change less often but do change periodically. If you need a permanent public IP, contact your internet service provider about a static IP plan — this usually costs extra per month.
Key Takeaways
- On Windows, open Command Prompt, type ipconfig, and look for "IPv4 Address" to find your local IP.
- On Mac, go to System Settings > Network to see your local IP, or type ifconfig in Terminal.
- On Linux, type hostname -I in a terminal to see your local IP address.
- Your local IP (192.168.x.x or 10.x.x.x) is used only on your home or office network, while your public IP is what the internet sees.
- Search "what is my IP" in any browser to find your public IP address when ready.
Frequently Asked Questions
What is the difference between IPv4 and IPv6?
IPv4 addresses use four numbers separated by dots (like 192.168.1.5) and are the standard most people use. IPv6 is a newer format with longer addresses using letters and numbers (like 2001:0db8:85a3::8a2e:0370:7334). Most home networks still use IPv4, but IPv6 is becoming more common. You can have both at the same time.
Is it safe to share my IP address?
Your public IP is visible to every website you visit, so sharing it is not a security risk by itself. Your local IP should not be shared outside your home network. Neither type of IP address alone reveals your identity or lets someone hack you, but combined with other information they can be part of a larger attack.
Why does my IP address show a different location than where I am?
IP addresses are assigned by region, but the mapping is not always precise. Your public IP might show a city 20 miles away from your actual location. This is normal and not a sign of a problem. If a website is blocking you based on location, contact the website's support to report the error.
Can I change my IP address?
Your local IP can be changed by setting a static IP in your router, or by restarting your router and computer to get a new one from DHCP. Your public IP can be changed by restarting your modem or contacting your internet service provider. Some people use a VPN to hide their public IP, but that is a separate tool.
What if ipconfig or ifconfig does not work?
Make sure you typed the command correctly and pressed Enter. On Windows, run Command Prompt as administrator (right-click and select "Run as administrator"). On Mac and Linux, you may need to type sudo before the command. If the command still does not work, your network driver may need updating — check your device manufacturer's website.