To find your IP address on a MacBook, open System Settings, go to Network, select your active connection, and view the IP address listed under "Status" or "Details." This applies to both Wi-Fi and Ethernet connections.
Your MacBook assigns itself an IP address automatically when connected to a network. This address identifies your device on the local network and is required for communication with routers, printers, and other devices. The IP address appears in the format 192.168.x.x or 10.x.x.x for private networks.
There are multiple ways to retrieve this information. The most accessible method uses the graphical interface in System Settings. For advanced users, Terminal offers direct access via command-line tools. A third option involves using the Network utility app, which provides detailed network diagnostics.
Your MacBook receives an IP address through DHCP (Changing Host Configuration Protocol), a standard protocol used by routers to assign addresses dynamically. When you connect to Wi-Fi or plug in an Ethernet cable, the router sends an IP address, subnet mask, gateway, and DNS server information.
If you're on a corporate or educational network, the router may assign a static IP address instead. Static IPs don't change between sessions and are manually configured. Most home users rely on changing IPs, which can shift each time the device reconnects.
For example, when connecting to a home Wi-Fi network, your MacBook might receive 192.168.1.15. This allows it to send and receive data within the local network. Without this address, services like file sharing, printer discovery, or remote access fail.
You need your MacBook's IP address for troubleshooting network issues, setting up port forwarding, accessing shared folders, configuring a web server, or connecting to devices like smart TVs or NAS drives.
For instance, if you're hosting a local website using Python's built-in server, you'll need the IP address to access it from another device. Running python3 -m http.server 8000 in Terminal starts a server, but visitors must enter http://192.168.1.15:8000 (replacing the IP with your actual address).
Another common use is enabling file sharing. If you want to transfer files to a friend's Mac on the same network, you can share a folder via System Settings > Sharing > File Sharing. They then connect via afp://192.168.1.15 in Finder.
The following methods work on macOS Sonoma and earlier versions. The process varies slightly depending on your macOS version.
| Method | Best for | Steps |
|---|---|---|
| System Settings (GUI) | Most users, quick access | Open System Settings → Network → Select active connection → Click "Details" → Look under "TCP/IP" tab for "IPv4 Address." |
| Terminal (Command Line) | Advanced users, scripting | Open Terminal → Run ipconfig getifaddr en0 (Wi-Fi) or ipconfig getifaddr en1 (Ethernet). Returns the IP address directly. |
| Network Utility | Diagnostics, network analysis | Open Applications → Utilities → Network Utility → Select "Netstat" tab → Choose "Interfaces" → Find your active interface (e.g., en0) → View IP under "Address." |
Using the GUI method, open System Settings, click Network in the sidebar, and select your active connection-usually Wi-Fi or Ethernet. Click the "Details" button. In the window that opens, switch to the "TCP/IP" tab. The IPv4 Address field shows your local IP address, such as 192.168.1.10.
For Terminal, run ipconfig getifaddr en0 to get the Wi-Fi IP address. Replace en0 with en1 for Ethernet. This command returns only the IP address, making it ideal for scripts or automation. For example, you can create a shell script that logs your IP address every hour.
A non-obvious fact: The interface name (en0, en1) depends on hardware. On newer MacBooks with Apple Silicon, Wi-Fi is often en0, while Ethernet is en1. On older Intel-based models, the naming can differ. Always verify which interface corresponds to your current connection.
Many users confuse their local IP address (like 192.168.1.10) with their public IP address-the one assigned by your ISP. Your public IP is visible when you visit sites like whatismyip.com. It changes periodically and is used for internet traffic routing. Your local IP is only valid within your home or office network.
Another mistake is assuming that the IP address shown in System Settings is the same as the one used for internet browsing. It is not. The router translates your local IP to its public IP using NAT (Network Address Translation). This keeps internal devices hidden from external networks.
For example, if your MacBook has a local IP of 192.168.1.10 and your router's public IP is 203.0.113.5, all outbound traffic appears to come from 203.0.113.5. This prevents direct access to your MacBook from the internet unless port forwarding is set up.
Suppose your MacBook loses internet connectivity intermittently. You suspect the issue lies with the router assigning incorrect IP addresses. To test this, you check the IP address via System Settings and see it's 169.254.1.100-a temporary address indicating a failed DHCP handshake.
This address is assigned automatically when a device cannot reach a DHCP server. It signals a network problem. You restart the router, reconnect, and confirm the IP address changed to 192.168.1.15. The internet works again.
Another scenario: You're setting up a home media server. You want to stream videos from your MacBook to a smart TV. The TV requires the MacBook's IP address to establish a connection. Using the Terminal command ipconfig getifaddr en0, you retrieve 192.168.1.15. You enter this into the TV's media app, and the stream begins.
Firsthand observation: During a workshop, I watched a participant try to connect a MacBook to a projector using AirPlay. The projector didn't detect the device. After checking the IP address in System Settings, I discovered the MacBook was on a different subnet due to a misconfigured VLAN. Correcting the network settings resolved the issue.
Always verify the IP address is correct before using it in configurations. A single typo in an IP address can prevent connectivity entirely.