DEV Community

Cover image for How to Find IP Address on Mac | ifconfig grep inet
WhoerIP.com
WhoerIP.com

Posted on

How to Find IP Address on Mac | ifconfig grep inet

Short GUI Route

If you absolutely must use the GUI: open System Settings > Network > click your connection > IP is right there. But you’re here for the terminal.

Looking for a complete step-by-step guide with visuals? Check out our detailed tutorial here: How to Find IP Address on Mac

What the ifconfig | grep inet Output Means — Full Explanation

Terminal All the Way

The command line is where the real details live. Fire up Terminal (Applications > Utilities > Terminal) and start with:

ifconfig | grep inet

This lists all IPv4 and IPv6 addresses across all interfaces. Here's what you’ll typically see:

inet 127.0.0.1 netmask 0xff000000
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
inet6 fe80::83e:a38d:7327:ab25%en0 prefixlen 64 scopeid 0xe
inet 192.168.1.240 netmask 0xffffff00 broadcast 192.168.1.255
inet6 fe80::70c6:8eff:feb1:f4e%awdl0 prefixlen 64 scopeid 0xf
inet6 fe80::70c6:8eff:feb1:f4e%llw0 prefixlen 0x10
inet6 fe80::9635:6e97:aff5:6e6f%utun0 prefixlen 64 scopeid 0x12
inet 10.8.1.1 --> 10.8.1.1 netmask 0xffffffff
inet6 fd58:baa6:dead::1 prefixlen 128
Enter fullscreen mode Exit fullscreen mode

Dissecting Every IP Address

inet 127.0.0.1 netmask 0xff000000

Loopback address — This is a special IP address (also called localhost) that always points back to your own device. It's used for internal testing or communication within your Mac. It never leaves your machine. The netmask 0xff000000 indicates only traffic to 127.x.x.x is kept internally.

inet6 ::1 prefixlen 128

IPv6 loopback — The IPv6 equivalent of 127.0.0.1. It's the local loopback interface for internal traffic only, but using the IPv6 protocol format.

inet 192.168.1.240 netmask 0xffffff00 broadcast 192.168.1.255

Internal IPv4 address — This is your private IP on your local network, assigned by your router (using DHCP). The netmask defines your subnet (here it's 255.255.255.0), and the broadcast address (used for sending messages to all devices on your local network) is 192.168.1.255.

inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1

IPv6 Link-local address (loopback) — Automatically assigned IPv6 addresses that work only within your local segment. fe80::/10 addresses are not routable to the internet. The %lo0 is the interface identifier (here, loopback).

inet6 fe80::83e:a38d:7327:ab25%en0 prefixlen 64 scopeid 0xe

IPv6 Link-local (Wi-Fi) — This link-local IPv6 address is assigned to your Mac’s en0 interface (typically Wi-Fi). It’s used for communication with other local devices, such as AirDrop, Bonjour, or printer discovery.

inet6 fe80::70c6:8eff:feb1:f4e%awdl0
and
inet6 fe80::70c6:8eff:feb1:f4e%llw0

These refer to Apple Wireless Direct Link (AWDL) and Low-Latency Wireless interfaces, used for peer-to-peer communication like AirDrop and AirPlay. Again, these are local-only addresses that don’t touch the internet.

inet6 fe80::9635:6e97:aff5:6e6f%utun0 (and similar utunX entries)

UTUN interfaces are virtual tunnel interfaces. These are often used by VPN services or Apple's network extensions. The fe80:: addresses here indicate secure or pseudo-network layers.

inet 10.8.1.1 --> 10.8.1.1 netmask 0xffffffff

VPN-assigned IP address — This IP is assigned by a VPN service and indicates a secure tunnel is active. The use of a 10.x.x.x address is consistent with private network ranges. The double arrow indicates a point-to-point connection.

inet6 fd58:baa6:dead::1 prefixlen 128

Unique Local Address (ULA) — Similar to a private IP in IPv6. These addresses are routable inside a private network, but not across the public internet. fdxx::/8 is reserved for such internal IPv6 traffic.

Each of these values helps developers and power users understand which interfaces are active, what role they play (internal, external, testing, VPN), and what IP addresses are reachable. Use this knowledge to troubleshoot, configure firewalls, or set up custom routing.

inet 127.0.0.1
Loopback address, always refers to your own machine

inet 192.168.1.240
Your internal IP address on the local network

inet6 fe80::...
IPv6 local-link addresses assigned to various interfaces

inet 10.8.1.1
A VPN-assigned internal address

broadcast
Defines the broadcast address for the network

netmask
Shows the subnet mask which defines the network's size

Bonus: Public IP via CLI

curl ifconfig.me
or
dig +short myip.opendns.com @resolver1.opendns.com

You'll typically use the inet line that matches your Wi-Fi or Ethernet adapter, usually near your router-assigned IP like 192.168.x.x or 10.x.x.x. Avoid using loopback or link-local addresses for network configuration.

Wrap-up

If you’re serious about networking on macOS, Terminal gives you more control and clarity than GUI. Knowing how to parse ifconfig output, recognize link-local vs. loopback vs. private vs. VPN-assigned addresses is table stakes.

Bookmark this if you ever need to check your network interfaces, debug connection issues, or configure routing rules manually.

Need to dig deeper into your IP, location, DNS leaks, or connection anonymity? Try our full-featured IP checker at whoerip.com — fast, accurate, and built for privacy-focused users.

Top comments (0)