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.