IPIPNOW
English
한국어English日本語中文

How do I find my IP address on a Mac?

On a Mac, open System Settings > Network > Wi-Fi and view the details to see your private IP, or run ipconfig getifaddr en0 in Terminal for the same result. Check your public IP by opening ipnow.kr or running curl ipnow.kr.

Last updated

Your public IP address
216.73.216.214
See my IP details

What if en0 is the wrong interface?

The Wi-Fi interface name can differ between Macs. Run networksetup -listallhardwareports in Terminal to find the exact interface name (en0, en1, and so on) tied to Wi-Fi.

The same command reveals the Ethernet port name if you are on a wired connection, which you can then use with ipconfig getifaddr.

What if System Settings and Terminal show different results?

Both methods should show the same private IP. A mismatch usually means you are connected to both Wi-Fi and Ethernet at once, and each command is checking a different interface.

If public versus private IP is still unclear, public vs private IP covers the basics first.

How do I find my router own IP (gateway)?

In the TCP/IP tab under Network > Wi-Fi > Details, the Router field is your router private IP. From Terminal, netstat -nr | grep default shows the same information.

For more on reaching the router admin page, see find your router IP.

How do I find my IP address on a Mac?: step by step

  1. Check your private IP in System SettingsOpen System Settings > Network > Wi-Fi, click Details... next to the connected network, and look under the TCP/IP tab for your private IP address.
  2. Check it with TerminalOpen Terminal and run ipconfig getifaddr en0. If you use a wired Ethernet connection instead of Wi-Fi, try en1 or another interface name.
  3. Check your public IP on ipnow.krOpen ipnow.kr in a browser and your provider-assigned public IP appears right on the first screen.
  4. Check your public IP from TerminalRun curl ipnow.kr to print your public IP on a single line, handy for scripting without opening a browser.

Frequently asked questions

Does the same method work on iPhone?

iPhone has a different menu layout, so it needs its own steps, which are covered in a separate iPhone guide.

What if ipconfig getifaddr en0 returns nothing?

It means that interface is not connected. Confirm Wi-Fi is on and connected to a network, then double-check the interface name.

Can I check my IPv6 address too?

Scrolling down in the network Details screen sometimes shows IPv6 information as well. Terminal offers more detail with ifconfig en0.

How do I get just the public IP in Terminal?

curl ipnow.kr prints only the public IP, which is convenient for piping into scripts or other commands.