Find your IP

Find your IP address on a Mac

Open System Settings, click Wi-Fi, click Details next to your network, then open the TCP/IP tab. The IPv4 Address row is your local address. In Terminal the one-line version is ipconfig getifaddr en0. For the public address websites see, open whatsmyip.fyi or run curl whatsmyip.fyi.

System Settings

  1. Apple menu, then System Settings.
  2. Click Wi-Fi in the sidebar, or Network and then your Ethernet service.
  3. Click Details… beside the connected network.
  4. Select the TCP/IP tab. You get Configure IPv4 (DHCP or Manual), IPv4 Address, Subnet Mask, and Router.
  5. The IPv6 section below shows the global address when the network provides one.

The DNS tab on the same sheet lists the resolvers in use. Grey entries came from DHCP; black entries you set yourself.

This is the layout in macOS 26 Tahoe and in every release since Ventura renamed System Preferences.

The fast version: Option-click the Wi-Fi menu

Hold Option and click the Wi-Fi icon in the menu bar. The expanded menu shows your IP address, router, security mode, channel, RSSI, and transmit rate without opening Settings. This is the quickest read on a Mac and it works on the lock screen menu bar as well.

Terminal

One address, no noise:

ipconfig getifaddr en0

Map interface names to physical ports first if you are unsure which one to ask about:

networksetup -listallhardwareports

Full picture for the Wi-Fi service, including router and DNS:

networksetup -getinfo Wi-Fi

Every interface with an address:

ifconfig | grep -E "^\w|inet "

The address actually used to reach the internet, taken from the routing table rather than guessed:

route -n get default | grep interface
ipconfig getifaddr $(route -n get default | awk '/interface/ {print $2}')

Local address versus public address

The address on those screens starts with 192.168., 10., or 172.16 to 172.31. Those blocks are private, reserved by RFC 1918, and they never appear in a website’s logs. What sites record is your router’s public address. See it on whatsmyip.fyi, or in Terminal:

curl whatsmyip.fyi
curl -4 https://v4.whatsmyip.fyi/ip
curl -6 https://v6.whatsmyip.fyi/ip
curl https://whatsmyip.fyi/json

The full report turns that address into ISP, autonomous system number, and approximate location. The public vs private guide explains why your Mac holds both kinds at once.

macOS features that change the answer

iCloud Private Relay (System Settings, Apple Account, iCloud, Private Relay) routes Safari traffic through two hops, so websites see an Apple partner’s egress address instead of your ISP’s. Your TCP/IP tab is unaffected, because the change happens after the packet leaves the Mac. Curl in Terminal bypasses Private Relay entirely, so it will report a different public address than Safari does.

Private Wi-Fi Address, on the Details sheet, randomises the MAC address per network. It changes hardware identity, not the IP address, though it can cause your router to hand out a new lease.

Limit IP Address Tracking, also on that sheet, sends Safari and Mail traffic to known trackers through Private Relay.

When the address is 169.254.x.x or missing

169.254.0.0/16 is a self-assigned link-local address, specified in RFC 3927. It means the interface is up but DHCP never answered. macOS also labels this “Self-Assigned IP” in the Network pane.

Work through it in this order:

  1. Renew the lease: TCP/IP tab, then Renew DHCP Lease.
  2. Confirm the router is reachable on the link: ping -c 3 $(route -n get default | awk '/gateway/ {print $2}').
  3. Delete and re-add the network service in Network, then reboot the router.

An empty Router row means you joined an access point with no path out, which is normal on a captive-portal network before you sign in.

Next

The Router row on the TCP/IP tab is your gateway. Type it into a browser to open the admin page, or read the find your router’s IP guide for the other platforms and the usual defaults.

Questions people ask

Is en0 always Wi-Fi on a Mac?
Not always. On laptops en0 is Wi-Fi. On a Mac mini, Mac Studio, or a Mac with a Thunderbolt dock, en0 can be Ethernet. Run networksetup -listallhardwareports to see which device name maps to which port.
Why does ipconfig getifaddr en0 print nothing?
That interface has no IPv4 address, usually because it is not the one carrying your connection. Try en1, or run ifconfig and look for an interface with an inet line and status active.
How do I see my Mac's public IP in Terminal?
Run curl whatsmyip.fyi for the plain address, or curl https://whatsmyip.fyi/json for the full record with ISP, ASN, and approximate location.

Last reviewed 2026-09-04. Reviewed quarterly, or sooner when a vendor changes something.