How to Find Your IP Address on Mac
Your Mac has a public IP address (assigned by your ISP, visible to the internet) and a private IP address (assigned by your router on your local network). macOS offers multiple ways to find both, from System Settings to the Terminal.
Finding Your Public IP on Mac
Open Safari or any browser and visit whatsmyipnow.com. Your public IPv4 and IPv6 are displayed instantly. Alternatively, open Terminal and run: curl ifconfig.me or curl https://api64.ipify.org to get your public IP from the command line.
Finding Your Private IP on Mac
| Method | Steps |
|---|---|
| System Settings (macOS Ventura+) | System Settings → Network → select Wi-Fi or Ethernet → Details → TCP/IP tab → IPv4 Address |
| System Preferences (macOS Monterey and earlier) | System Preferences → Network → select your connection → IP Address shown on right panel |
| Terminal - Ifconfig | Open Terminal, run ifconfig en0 (Wi-Fi) or ifconfig en1 (Ethernet) - Look for the inet line |
| Terminal - Ipconfig | Run ipconfig getifaddr en0 to output just the IP address of Wi-Fi with no extra text |
| Option-click Wi-Fi menu icon | Hold Option and click the Wi-Fi icon in the menu bar - IP address is shown directly in the dropdown |
Common ifconfig Output Explained
Running ifconfig en0 in Terminal returns output like: inet 192.168.1.50 netmask 0xffffff00 broadcast 192.168.1.255. The inet value is your private IPv4 address. The inet6 line shows your IPv6 address. The ether line is your MAC address.
Key Points for Mac Users
- Wi-Fi is typically
en0on MacBooks; Ethernet is typicallyen1oren2on iMacs with a USB-C adapter. - To renew your DHCP lease and request a new private IP: System Settings → Network → Wi-Fi → Details → TCP/IP → Renew DHCP Lease.
- macOS uses a Bonjour address (169.254.x.x) when no DHCP server is available - This indicates a network configuration problem.
- Setting a static IP prevents the IP from changing on reconnect, useful for printer sharing or port forwarding rules.
- All devices on your network share the same public IP through your router's NAT - Only your private IP is unique per device.
Useful Terminal Commands Beyond ifconfig
| Command | What It Shows |
|---|---|
ipconfig getifaddr en0 | Just your Wi-Fi private IPv4 - Ideal for scripts |
ipconfig getoption en0 router | Your default gateway (router) address |
ipconfig getoption en0 domain_name_server | The DNS server your Mac is using |
networksetup -listallhardwareports | Maps friendly names (Wi-Fi, Ethernet) to interface names (en0, en1) |
netstat -nr | head -10 | The routing table - Which interface traffic actually uses |
scutil --dns | head -15 | The full resolver configuration, including VPN-pushed DNS |
Renewing your DHCP lease
Go to System Settings → Wi-Fi → Details → TCP/IP and click Renew DHCP Lease. From the command line, sudo ipconfig set en0 DHCP forces a fresh request. Either way your Mac re-runs the DHCP handshake with the router, which resolves most "connected but no internet" states caused by a stale or conflicting lease.
Setting a static IP cleanly
In the same TCP/IP pane, switch Configure IPv4 from "Using DHCP" to Manually and enter an address outside the router's DHCP pool. Better still, leave the Mac on DHCP and create a reservation in the router tied to the Mac's hardware address - The Mac then always receives the same IP at home but still works normally on other networks.
Location-Dependent Settings and macOS Quirks
- macOS keeps separate network settings per service and location - A manual IP configured for the office persists when you get home, causing conflicts. Check Configure IPv4 if your home Wi-Fi suddenly fails.
- Hold Option while clicking the Wi-Fi menu-bar icon for instant diagnostics: IP, router, channel, RSSI, and noise without opening Settings.
- iCloud Private Relay (Apple menu → System Settings → your name → iCloud) masks your IP in Safari only - Other browsers and apps still expose your router's public address.
- When a VPN is connected, ifconfig shows an extra
utuninterface carrying the tunnel - Verify it actually masks you with a VPN leak test.
What This Means for You
Mac users get two equally good doors to the same information - System Settings for the visual path, Terminal for the fast one - And which you use matters less than knowing which address you are looking at. The inet value on en0 is your local identity, shared safely in any screenshot; the address shown by the homepage is your household's public face, the one geo-blocks and rate limits act on. The most common Mac-specific trap is stale per-location manual settings, so when your connection misbehaves on one network but not another, check Configure IPv4 before blaming the router.
Frequently Asked Questions
What is the difference between ifconfig and ipconfig on Mac?
ifconfig is the traditional Unix tool that dumps every detail of every interface; macOS's ipconfig is a smaller utility for querying the DHCP client - One value at a time, like just your IP or just your router. For quick answers, ipconfig getifaddr en0 is the cleanest option.
Why does my Mac have several IPv6 addresses at once?
That is normal. Every interface holds a link-local fe80 address, and with IPv6-enabled routers it also gets a stable global address plus temporary privacy addresses that rotate periodically. The temporary ones are used for outgoing connections so websites cannot track a fixed identifier.
How do I find another device's IP from my Mac?
If you know its hostname, ping it (ping printer.local) and read the address from the reply. To survey the whole network, check the router's client list - The authoritative source - Or use ARP after a broadcast ping: ping the broadcast address, then run arp -a to list responding devices.