Every Mac user encounters a moment where they need to identify their machine’s IP address. Whether you are troubleshooting a network issue, setting up port forwarding for a server, or simply verifying your connection type, knowing how to locate this information is essential. The process is straightforward, but the specific steps differ depending on whether you require the internal local address or the external public-facing address.
Understanding IP Address Types
Before diving into the "how-to," it is important to understand the two distinct types of IP addresses your Mac utilizes. Your Local Area Network (LAN) IP address is assigned by your router and is used for communication within your home or office network. This is the address other devices on your Wi-Fi or Ethernet connection see. Conversely, your Public IP address is assigned by your Internet Service Provider (ISP) and is used for communication across the wider internet. When people ask "what is my IP address?" they are usually referring to the public one.
Finding Your IP Address via System Settings
The most modern and visual method to find your local IP address is through macOS System Settings. This interface provides a clear breakdown of your network configuration without needing to open a terminal window. The steps below guide you through the exact navigation path.
Step-by-Step Guide
Click the Apple logo located in the top-left corner of your screen and select "System Settings" (or "Preferences" on older macOS versions).
In the left-hand sidebar, click on "Network."
Select the active connection from the list on the right. This will typically be named "Wi-Fi" if you are wireless or "Ethernet" if you are using a wired connection.
Your current IP address will be displayed prominently beneath the connection status, labeled as "IP address."
Using the Terminal for Advanced Information
For users who prefer command-line efficiency or need to find the external IP address, the Terminal application is the perfect tool. The Terminal provides direct access to the Unix underpinnings of macOS, allowing you to query specific network interfaces or external services that report your public address.
Terminal Commands
To find your local IP address, type ifconfig and press Enter. Look for the section labeled "en0" (Wi-Fi) or "en1" (Ethernet). The line labeled "inet" followed by a series of numbers (e.g., 192.168.1.5) is your local IP address.
To find your public IP address, you can query a web service designed for this purpose. Type the following command into the terminal: curl ifconfig.me . The terminal will return a single line of text, which is your public IP address as seen by the internet.
Finding Your Router’s IP Address
Knowing your router’s IP address, also known as the default gateway, is useful for accessing the router’s administrative interface. This address is where you go to change Wi-Fi passwords or port forwarding rules. You can find this information directly within the Network settings you accessed earlier.
Once you have navigated to System Settings > Network > [Your Connection], look for the entry labeled "Router." This is the IP address of your hardware gateway. Alternatively, you can find this in the Terminal by typing the command netstat -nr | grep default , which displays the routing table and highlights the default gateway IP.
Verifying with Network Utility
macOS includes a lesser-known but powerful application called Network Utility, which bundles various networking tools into one interface. This provides a middle ground between the graphical System Settings and the raw power of the Terminal.