Finding your computer's network identifier doesn't require advanced technical knowledge, whether you're troubleshooting a home connection, setting up a local printer, or configuring port forwarding. Every connected machine relies on Internet Protocol numbers to route data accurately across local networks and the broader internet.
Most operating systems make this information accessible through quick command-line utilities or built-in system menus. This guide walks you through finding both your local network identifier and your public-facing connection details across Windows, macOS, and Linux.
Understanding Local Versus Public IP Addresses
Before running commands, it's helpful to understand the two distinct addresses assigned to your setup.
Your private IP address is assigned by your local router via DHCP. It identifies your specific machine within your home or office network, typically starting with numbers like 192.168 or 10.0.
Your public IP address is assigned by your Internet Service Provider (ISP). It's the singular numerical label that your entire household shares when communicating with external websites and servers. Because your router shields your internal setup, your computer doesn't natively display this public identifier in standard local network settings.
How to Find Your IP Address on Windows
Windows offers multiple ways to view your network configuration, ranging from graphical menus to fast terminal commands.
Using the Command Prompt
The fastest method for technical checks is the standard command line tool.
- Press the Windows key and type
cmd, then hit Enter. - In the terminal window, type
ipconfigand press Enter. - Look for your active connection, labeled as Wireless LAN adapter Wi-Fi or Ethernet adapter Ethernet.
- Locate the line marked IPv4 Address. The number listed there is your machine's local network identifier.
Using Windows Settings
If you prefer a visual interface without using terminal commands, you can locate the information through the system settings app.
- Open Settings by pressing the Windows key and the letter I.
- Navigate to Network & internet.
- Click on Wi-Fi or Ethernet, then click on your specific active network connection properties.
- Scroll down to find the IPv4 address listed among your connection properties.
How to Find Your IP Address on macOS
Apple keeps network configurations streamlined across both system settings and the Unix-based terminal.
Using System Settings
For a quick graphical check on a Mac:
- Click the Apple icon in the top-left corner of your screen.
- Select System Settings.
- Click Network in the sidebar, then select your active connection, such as Wi-Fi or Ethernet.
- Click the Details button next to your active connection to view your assigned IP address.
Using the Terminal
If you prefer using the command line on macOS, you can query your active interface directly.
- Open the Terminal application using Spotlight search.
- Type
ipconfig getifaddr en0for Wi-Fi connections and press Enter. (If you're plugged into an ethernet cable, the interface might be labeleden1oren2). - The terminal will instantly output your active IPv4 address.
For more comprehensive details on all active interfaces, you can review the Apple Support Guide for network troubleshooting.
How to Find Your IP Address on Linux
Linux distributions rely on modern networking utilities to display interface data cleanly.
Using the IP Command
The standard modern command for checking network interfaces across most Linux distributions is straightforward.
- Open your terminal emulator.
- Type
ip addr showand press Enter. - Scan the output for your active interface, looking for the line starting with
inetfollowed by your local address and subnet mask.
Using Hostname
For a quick script-friendly output that skips extra interface data, you can run a targeted hostname query.
- Open your terminal.
- Type
hostname -Iand press Enter. - The system will print out the active IP addresses assigned to your machine.
How to Find Your Public IP Address
Because your local machine only knows its private local identifier, you have to query an external service to see the address your router presents to the web.
Using a Web Browser
You can use any browser to query a lookup service. Visiting a reliable provider like Cloudflare Diagnostics or a similar utility will instantly display your public-facing IPv4 or IPv6 address.
Using the Command Line
If you're working inside a terminal, you can fetch your public address directly without opening a browser window.
- Open your command line interface.
- Type
curl ifconfig.meand press Enter. - The raw public address will return directly in your terminal window.
Common Mistakes and Troubleshooting
When searching for your network identifier, a few common pitfalls often trip users up.
- Checking the wrong adapter: If your computer has both Wi-Fi and Ethernet enabled, you might pull the address for the interface you aren't currently using. Always verify which connection is active in your system tray or settings menu.
- Confusing local and public addresses: Giving someone your local private address (like 192.168.1.5) won't help them connect to you from outside your home network. Ensure you use a public lookup service when sharing your external connection details.
- VPN interference: If you have a Virtual Private Network active, your terminal or browser might display the IP address of your VPN server rather than your physical home network. Disable your VPN temporarily if you need to check your local configuration.
Frequently Asked Questions
Can my local IP address change over time?
Yes. Most home routers use DHCP to dynamically assign local IP addresses. If your computer disconnects for an extended period or you restart your router, your machine might receive a different local number next time it connects.
What is the difference between IPv4 and IPv6?
IPv4 addresses use a 32-bit numeric format separated by dots (e.g., 192.168.1.15), which limits the total number of available addresses. IPv6 uses a 128-bit alphanumeric format separated by colons to accommodate the massive global expansion of connected devices.
How do I assign a static IP address to my computer?
You can configure a static local address either through your operating system's network adapter settings or by setting up a DHCP reservation inside your router's administrative dashboard using your computer's physical MAC address.
Is my public IP address permanent?
For most residential internet plans, your public IP address is dynamic and changes occasionally when your router renegotiates a lease with your ISP. If you need a permanent public identifier, you typically have to request a static business plan from your provider.