How to Find Your IP Address on a Mac: Settings, Terminal and Public IP
Short answer
Choose Apple menu > System Settings, click Wi-Fi, then click Details next to your network: IP address is your Mac’s local IP, and Router is your router’s. In Terminal, ipconfig getifaddr en0 prints the same address (try en1 if nothing appears). Websites see a different address, your public IP, which the box on this page shows.
On this page
- Which IP address on your Mac do you need?
- How to find your IP address on a Mac in System Settings
- How to check your IP address from the Wi-Fi menu
- How to get your IP address on a Mac in Terminal
- How to find your public IP address on a Mac
- IPv6 addresses on a Mac: why there are several
- MAC address vs. IP address: what’s the difference?
- How to change your IP address on a Mac
- Troubleshooting: Mac has a self-assigned IP address (169.254)
Your Mac shows its IP address in System Settings > Wi-Fi > Details, in the Wi-Fi menu when you Option-click it, and in Terminal with ipconfig getifaddr en0. All three show the local (private) IP that your router assigned, such as 192.168.1.23. The box below shows your public IP, the address websites see. The steps cover macOS 27 Golden Gate back to macOS Ventura 13, with a note for older versions.
Your public IP address
216.73.216.128
- Location
- Columbus, Ohio, United States
- Provider
- Anthropic, PBC (AS16509)
- Time zone
- America/New_York (UTC−4)
- Coordinates
- 39.96, -83.00
This is the address websites see, and the location is an estimate that can be off by a city or more. Your device's local IP (often 192.168.x.x) is a different one and only works inside your network.
Which IP address on your Mac do you need?
| Address | Looks like | Used for | Where to find it on a Mac |
|---|---|---|---|
| Local (private) IP | 192.168.1.23 | File sharing, printers, port forwarding | Wi-Fi > Details > IP address, or ipconfig getifaddr en0 |
| Router (default gateway) | 192.168.1.1 | Opening the router’s admin page | Router in the same window, or route -n get default |
| Public IP | 203.0.113.42 | Allowlists, remote access, hosting | The box above, or dig in Terminal |
| MAC address | 00:00:5e:00:53:af | Identifying the network hardware | Details > Hardware |
Local IPv4 addresses start with 192.168, 10, or 172.16 to 172.31 and work only inside your network; local IP addresses explained covers the details. For phones, PCs and other devices, see how to find your IP address on any device.
How to find your IP address on a Mac in System Settings
These steps work in macOS 27 Golden Gate, Tahoe 26, Sequoia 15, Sonoma 14 and Ventura 13.
- Choose Apple menu > System Settings.
- Click Wi-Fi in the sidebar.
- Click Details next to the network you’re connected to.
- Read IP address. Router is your router’s local address.
Click TCP/IP in the sidebar of the same window for the subnet mask and IPv6 address. Apple explains the options on that pane in Change TCP/IP settings on Mac.
Find the IP address of an Ethernet connection
- Choose Apple menu > System Settings, then click Network in the sidebar.
- Click your wired service: Ethernet, or the name of your adapter or dock, such as USB 10/100/1000 LAN.
- Click Details, then click TCP/IP.
- Read IP address and Router.
Wi-Fi and Ethernet each get their own local IP address.
Note
Thunderbolt Bridge in the Network list links two Macs by cable. It often shows Not connected or an address that starts with 169.254. That’s normal and doesn’t affect your internet connection.
macOS Monterey 12 and earlier
Choose Apple menu > System Preferences > Network, then select Wi-Fi or Ethernet in the list. The status text shows the IP address. For the router and subnet mask, click Advanced, then TCP/IP.
How to check your IP address from the Wi-Fi menu
Hold the Option key and click the Wi-Fi icon in the menu bar. Below the network you’re connected to, macOS shows the IP Address and Router, plus the channel, band and security type, as Apple’s Wi-Fi status menu guide describes.
No Wi-Fi icon? In macOS 27 and Tahoe 26, open System Settings > Menu Bar and select Wi-Fi. In Ventura to Sequoia, open System Settings > Control Center and choose Show in Menu Bar next to Wi-Fi.
How to get your IP address on a Mac in Terminal
Open Terminal (press Command-Space bar, type Terminal, press Return) and run:
ipconfig getifaddr en0It prints the IPv4 address of the interface en0, such as 192.168.1.23. No output means en0 has no IPv4 address, usually because it isn’t your active connection.
en0 or en1: which interface is yours?
On a MacBook Air or MacBook Pro, Wi-Fi is usually en0, and en1 is often a Thunderbolt port that prints nothing. On Macs with a built-in Ethernet port, such as Mac mini and Mac Studio, Ethernet is usually en0 and Wi-Fi en1. Adapters and docks get higher numbers. To see the names on your Mac, run:
networksetup -listallhardwareportsEach block pairs a Hardware Port, such as Wi-Fi, with its Device, such as en0. Or let macOS use whichever interface carries your internet traffic:
ipconfig getifaddr "$(route -n get default | awk '/interface:/{print $2}')"Mac IP address Terminal commands
| Command | What it shows |
|---|---|
networksetup -getinfo "Wi-Fi" | IP address, subnet mask, router and hardware address (other service names: networksetup -listallnetworkservices) |
ifconfig en0 inet | The IPv4 address of en0, with the netmask in hex (0xffffff00 is 255.255.255.0) |
ifconfig en0 inet6 | All IPv6 addresses of en0 |
route -n get default | Your router on the gateway line, the active interface on the interface line |
ifconfig | Every interface; lo0 with 127.0.0.1 is the loopback address, not your IP |
arp -a | Devices your Mac recently exchanged data with, by IP and MAC address |
ipconfig on a Mac vs. Windows
The Mac’s ipconfig isn’t the Windows tool. It needs a subcommand such as getifaddr, and ipconfig /all doesn’t exist; use ifconfig or networksetup -getinfo "Wi-Fi" instead. On a PC, follow how to find your IP address on Windows.
How to find your public IP address on a Mac
Your public IPv4 address belongs to your router, so System Settings and ipconfig never show it. The box at the top of this page does. In Terminal, this command asks a DNS server to return the address your request came from:
dig -4 +short myip.opendns.com @resolver1.opendns.comKeep the -4: on a network with IPv6, dig otherwise asks over IPv6, and OpenDNS then returns no IPv4 address, so the command prints nothing.
For scripts that also need the country or time zone, our IP lookup API answers for the caller’s own IP when you leave out the ip parameter:
curl -H "apikey: YOUR_API_KEY" "https://api.iplookupapi.com/v1/info?fields=ip,location.country.alpha2,timezone.id"A free API key includes 150 requests a month, and the info endpoint documentation lists every field. With a VPN or iCloud Private Relay on, websites see a different address.
IPv6 addresses on a Mac: why there are several
On a network with IPv6, TCP/IP shows an IPv6 address, and ifconfig en0 inet6 lists several. That’s normal:
- fe80:: addresses are link-local and work only on your local network.
- Addresses marked temporary change regularly for privacy. macOS prefers them for outgoing connections, so websites usually see one of these.
- The address marked secured without temporary stays the same while your Mac is on that network.
- Addresses that start with fd are private, like 192.168 addresses in IPv4.
Global IPv6 addresses, which usually start with 2, are public. That’s why the box above can show IPv6 on one network and IPv4 on another.
MAC address vs. IP address: what’s the difference?
A MAC (media access control) address is the hardware ID of a network interface, such as your Mac’s Wi-Fi chip. The name has nothing to do with Mac computers: PCs, phones and printers have MAC addresses too. An IP address is the network address your router or provider assigns, and it can change.
| MAC address | IP address | |
|---|---|---|
| Example | 00:00:5e:00:53:af | 192.168.1.23 or 2001:db8::23 |
| Assigned by | The manufacturer (or macOS, for a private address) | Your router (local IP) or provider (public IP) |
| Who sees it | Only devices on your local network | Public IP: every site and service you connect to |
| Where on a Mac | Wi-Fi > Details > Hardware > MAC address | Wi-Fi > Details > IP address |
On macOS Sequoia 15 and later, your Mac can join Wi-Fi with a Private Wi-Fi address instead of its hardware MAC address. In the Details window, Wi-Fi address shows the address the network sees, and the Private Wi-Fi address menu offers Off, Fixed and Rotating. Apple explains each option in Use a private Wi-Fi address on Mac.
Tip
If your router reserves IP addresses by MAC address or blocks unknown devices, set Private Wi-Fi address to Fixed or Off for that network. With Rotating, the router can mistake your Mac for a new device.
How to change your IP address on a Mac
Set a manual (static) IP address
- Choose Apple menu > System Settings, then click Network in the sidebar.
- Click Wi-Fi and then Details next to your network, or click your Ethernet service and then Details.
- Click TCP/IP.
- Open the Configure IPv4 menu and choose Manually.
- Enter the IP address, Subnet mask and Router.
- Click OK.
To set a fixed address but still get the router and DNS settings from DHCP, choose Using DHCP with manual address and enter only the IP address. Pick an address outside the router’s DHCP range. With Manually, if websites stop loading, add a DNS server, such as your router’s address, in the DNS pane. Static vs. dynamic IP addresses explains when a fixed address is worth it and why a router reservation is often simpler.
The Terminal equivalent asks for your password; the second command switches back to DHCP:
sudo networksetup -setmanual "Wi-Fi" 192.168.1.50 255.255.255.0 192.168.1.1
sudo networksetup -setdhcp "Wi-Fi"Get a new local IP address
In the same TCP/IP pane, click Renew DHCP Lease, review the message, then click Apply. The button appears only when the connection uses DHCP. The router may hand back the same address, which is normal.
Change your public IP address
Your provider assigns the public IP to your router, so no Mac setting changes it. If the address is dynamic, restarting the router may bring a new one; otherwise, ask your provider. A VPN or iCloud Private Relay changes only the address that websites see.
Troubleshooting: Mac has a self-assigned IP address (169.254)
An address that starts with 169.254 means your Mac got no answer from the router’s DHCP server and gave itself a link-local address. With it, your Mac can’t reach the internet. Try these steps in order:
- Turn Wi-Fi off and on in the Wi-Fi menu, or unplug and replug the network cable.
- In TCP/IP, check that Configure IPv4 is set to Using DHCP, click Renew DHCP Lease, then click Apply.
- Restart the router and wait until it’s fully back online.
- In the Wi-Fi Details window, click Forget This Network, then join the network again with its password.
- If the router blocks unknown devices by MAC address, set Private Wi-Fi address to Fixed or Off, or add the Mac’s Wi-Fi address to the router’s allowed list.
- If other devices also get 169.254 addresses, the router’s DHCP server is off or out of addresses. Check it on the router’s admin page; find your router’s IP address first if you don’t know it.
The 169.254 IP address guide covers more causes, including cables, adapters and router settings.
If macOS warns that another device is using your IP address, two devices have the same address, usually because one was set manually. Switch Configure IPv4 back to Using DHCP, or pick an unused address.
Frequently asked questions
What is the command to find my IP address on a Mac?
Open Terminal and run ipconfig getifaddr en0. It prints your Mac’s local IP address, such as 192.168.1.23. If nothing appears, try en1, or run networksetup -listallhardwareports to see which device name belongs to Wi-Fi or Ethernet. For your public IP, run dig -4 +short myip.opendns.com @resolver1.opendns.com.
How do I find my Mac's host name?
Choose Apple menu > System Settings > General > Sharing and scroll to Local hostname at the bottom. It’s your computer name with .local added and hyphens instead of spaces, such as My-MacBook-Air.local; click Edit to change it. The computer name itself is under General > About.
Is there an IP scanner for Mac?
macOS has no built-in IP scanner app. In Terminal, arp -a lists the devices your Mac has recently exchanged data with, by IP and MAC address. Your router’s list of connected devices is more complete, because it shows every device the router gave an address to. Scanner apps are available in the Mac App Store; use them only on networks you own or manage.
How do I find my 192.168 IP address on a Mac?
An address that starts with 192.168 is your Mac’s local IP. Open System Settings > Wi-Fi, click Details next to your network and read IP address, or run ipconfig getifaddr en0 in Terminal. Depending on the router, a local IP can also start with 10 or with 172.16 to 172.31.
Is a MAC address the same as an IP address?
No. A MAC address is the hardware ID of a network interface, such as 00:00:5e:00:53:af, and only devices on your local network see it; the name has nothing to do with Mac computers. An IP address, such as 192.168.1.23, is the network address your router or provider assigns, and it can change. On a Mac, both are in System Settings > Wi-Fi > Details: IP address on the first pane, MAC address under Hardware.
Does ipconfig work on a Mac?
Yes, but the Mac’s ipconfig is a different tool from the Windows command. It needs a subcommand, such as ipconfig getifaddr en0 for the local IPv4 address or ipconfig getoption en0 router for the router, and Windows options like /all don’t exist. For an overview of every interface, use ifconfig or networksetup -getinfo Wi-Fi.