Check your Mac's public IP address from Terminal
Find the external IP your router or VPN presents to the internet.
01Command
$ curl -s https://ifconfig.me && echo02What it does
Your Mac's local address (System Settings → Wi-Fi → Details) is private; what websites see is the public IP of your router or VPN exit node. Asking an echo service like ifconfig.me returns that address as plain text, and curl -s keeps the output clean. The trailing && echo just adds a newline so the prompt starts on a new line. Behind IPv6, some services return the v6 address — use https://api64.ipify.org explicitly if you want one or the other.
03Risk
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- macOS curl command referenceEvidence: curl -s fetches a URL quietly and prints only the response body, which echo ends with a newline.
- ifconfig.me — IP echo serviceEvidence: The service returns the requester's public IP address as plain text.
Last verified: 2026-09-16 · Category: Network
06Related solutions
Point macOS screen captures at any folder you choose instead of the desktop.
Grab any file from the web straight into the current folder — no browser needed.
List the biggest files in your home folder that are eating disk space.