Finding Your IP Address on Windows, Mac, or Linux
Your computer's IP address is a set of numbers that identifies it on a network — like a mailing address for data. Every device connected to the internet or a local network has one. You may need to find it to troubleshoot connection problems, set up a printer, connect to a remote desktop, or give it to technical support.
The steps differ slightly depending on your operating system, but the process takes less than a minute on any of them. You have two main routes: using the command line (fastest) or navigating through settings (more visual). Both give you the same information.
Key Takeaways
- On Windows, open Command Prompt and type ipconfig to see your IP address listed as "IPv4 Address".
- On Mac, open System Preferences, select Network, and your IP address appears in the connection details for your active network.
- On Linux, open a terminal and type hostname -I or ip addr to display your IP address.
- Your local IP address (starting with 192.168 or 10.) is different from your public IP, which is what websites see when you visit them.
- If you see "169.254" as your IP address, your computer is not connected to the network properly and needs troubleshooting.
Checking Your IP on Windows Using Command Prompt
The fastest way on Windows is through Command Prompt. Press the Windows key, type cmd, and press Enter. A black window opens with a blinking cursor.
Type ipconfig and press Enter. A list of information appears. Look for the line that says "IPv4 Address" — the number next to it (usually starting with 192.168 or 10.) is your local IP address. You will also see a "Default Gateway" and "DNS Servers" listed below it.
If you need your public IP address instead (the one your internet provider assigns to your whole network), type ipconfig /all and look for "IPv4 Address" under your active network adapter. For a quicker public IP lookup, you can also visit a website like whatismyipaddress.com in your browser — it displays your public IP when ready.
Checking Your IP on Mac Through System Settings
On Mac, click the Apple menu in the top-left corner and select "System Settings" (or "System Preferences" on older versions). In the sidebar, click "Network".
You will see a list of network connections on the left — Wi-Fi, Ethernet, or others. Click the one you are currently using (it will have a green dot next to it). On the right side, your IP address appears in the details panel, labeled "IPv4 Address".
If you prefer the command line, open Terminal (find it in Applications > Utilities), type ifconfig, and press Enter. Scroll through the output and find the line that says "inet" followed by your IP address.
Checking Your IP on Linux from the Terminal
Open a terminal window. Type hostname -I and press Enter. Your IP address appears on the next line — this is the simplest method and works on most Linux distributions.
If that does not work, try ip addr instead. This shows more detailed information. Look for a section labeled "inet" followed by your IP address and a forward slash with a number (like /24). The number before the slash is your IP address.
Another option is ifconfig, which works similarly to the Mac command. Type it and look for "inet" in the output. All three commands show your local IP address on your network.
Understanding Local IP vs. Public IP
Your computer actually has two IP addresses. The local IP address (or private IP) is what devices on your home or office network use to find your computer. It usually starts with 192.168, 10., or 172.16. This is the address you see when you run ipconfig, ifconfig, or check System Settings.
Your public IP address is assigned by your internet service provider and is what websites see when you visit them. It is the same for all devices on your network because it represents your whole internet connection, not just one computer. To find your public IP, visit a website like whatismyipaddress.com or type "what is my IP" into a search engine.
You need your local IP for tasks like connecting to a printer on your network or setting up remote access. You need your public IP if you are troubleshooting with your internet provider or setting up port forwarding on your router.
What to Do If Your IP Address Looks Wrong
If your IP address starts with 169.254, your computer is not properly connected to the network. This is an automatic address Windows and Mac assign when they cannot reach a DHCP server (the device that hands out IP addresses on your network).
First, restart your computer. If the problem persists, restart your router — unplug it for 30 seconds, then plug it back in and wait two minutes for it to fully start. Check your network cable if you are using Ethernet, or try forgetting and rejoining your Wi-Fi network if you are wireless.
If you still see 169.254, your router may not be working properly, or your network adapter may need a driver update. Contact your internet provider or network administrator for help at this point.
Using Your IP Address for Common Tasks
Once you have your local IP address, you can use it to connect to other devices on your network. To print to a network printer, you often enter the printer's IP address into your computer's printer settings. To access a file server or network drive, you type the server's IP address into your file browser.
If you need to let someone access your computer remotely, you give them your IP address so they can connect via remote desktop software. Some routers let you assign a static IP address to your computer so it does not change — this is useful if you set up services that others need to reach consistently.
For most everyday use, you do not need to think about your IP address at all. But when something is not working on your network, knowing how to find it quickly can save you time troubleshooting.
Frequently Asked Questions
Why does my IP address keep changing?
Your router assigns IP addresses temporarily using DHCP. Most home networks reassign them every few hours or days. If you need a permanent address for a specific device, you can set a static IP in your router settings or in your computer's network configuration. Contact your network administrator if you are unsure how to do this.
Is it safe to share my IP address?
Your public IP address is visible to every website you visit, so sharing it is generally safe — websites already know it. Your local IP address is only useful to people on your network, so sharing it with someone outside your home or office does not help them. Never share passwords or sensitive account information, regardless of IP address.
What if I cannot find the IPv4 Address line in ipconfig?
Scroll up in the Command Prompt window — the output may be longer than what fits on screen at once. If you still do not see it, your network adapter may not be connected. Check that your Ethernet cable is plugged in or that you are connected to Wi-Fi, then run ipconfig again.
Can I change my IP address myself?
You can request a new local IP by unplugging your router for a few minutes, which forces it to reassign addresses. For your public IP, contact your internet provider — they control it. Some providers change it automatically every few months, while others keep it the same unless you request a change.