How to run ipconfig on a Mac | Harper29
Call Us Free 773-759-7945
user heart cart0
order Free Shipping on Orders Over $100

How to run ipconfig on a Mac

The Terminal app on macOS Sequoia is one of the most advanced tools, allowing power users to execute complex command lines. One of the commonly executed ones is ipconfig, which enables users of the latest Macs to view their IP address. So, what's an IP address, and how does ipconfig work? Let's find out.


macOS is one of the easier operating systems to use, but there are a lot of advanced tools available through the Terminal.

What's an IP address?

The address book of the internet

The 4.5K display on a 24-inch iMac.© Provided by XDA Developers

An IP address, or Internet Protocol address, is a set of numbers that identify a device using the internet. It's essential for sending and receiving data via the web, and it's a unique identifier for a device in a given network. On the wider internet, you have a public IP address, but you'll have a local IP address on your home network, too.


Knowing either of your IP addresses can come in handy for many reasons, such as accessing your device remotely, configuring a Wi-Fi router, troubleshooting network-related issues, and more. Regardless of your intent, you can reveal your local IP address by running an ipconfig with the steps below.

How to run ipconfig in Terminal to reveal your local IP address

Running an ipconfig in the Terminal app reveals your local IP address. However, the command differs if you're connected wired or wirelessly.

  1. Launch the Terminal app on your Mac.
  2. Paste one of the following commands:
    • If you're connected to Wi-Fi: ipconfig getifaddr en0
    • If you're connected to Ethernet: ipconfig getifaddr en1
  3. Hit the Return button.
  4. Terminal should now reveal your IP address.
    local-ip-macos© Provided by XDA Developers

How to reveal your local IP address using the System Settings

The System Settings app is an easier way to check your local IP address. This IP address is one that's internal to your home network, and can't be accessed from outside of it. Here's how to access it:

  1. Launch System Settings on your Mac, and go to the Wi-Fi section.
  2. Click Details on the network you're connected to.
    wifi details button in macOS settings© Provided by XDA Developers

    The Wi-Fi details button in the System Settings app that will show information about your Mac's IP address.
  3. Go to TCP/IP in the sidebar.
  4. Your local IP address will be listed there.
    IP address field in wifi settings on Mac© Provided by XDA Developers

How to uncover your public IP address using the Terminal

Using curl to get the current public IP address of the connected device© Provided by XDA Developers

If you want to grab your public IP adddress using the Terrminal, you can do it with a simple curl command. The reason you need to use an external service is because your router handles translation from public connections to a local connection, so your Mac won't know its public IP from the information that it has access to. However, external websites can tell you what your IP address is.

Related video: How To Transfer Photos From iPhone To PC & Laptop (Howfinity)

  1. Launch the Terminal app on your Mac.
  2. Paste the following command: curl https://ipinfo.io/ip

The response you get will be your current public IP address, with a percentage sign at the end.

How to uncover your public IP address using a web browser

If you want to check your public IP address, use one of the dedicated websites.

  1. Launch Safari or the web browser you typically use on your Mac.
  2. Search the web with a query like "what's my IP address?"
  3. The websites listed at the top of the results should reveal your IP address when you visit them.
    • If you're using DuckDuckGo as your search engine, it may also display your IP address itself, sparing you the need to visit another website.
      duckduckgo search showing ip address of user© Provided by XDA Developers

Remember that if you have iCloud Private Relay or a VPN enabled, the websites will show a different IP address.

The bottom line: There are multiple ways to check your IP addresses

MacBook Air M3 on a table© Provided by XDA Developers

Knowing your IP address can be useful when troubleshooting network-related issues or setting up certain features on your Wi-Fi router. Still, it depends on what IP address you actually need. As you can see, there are several options to retrieve your IP address, but that's because you actually have multiple IP addresses. If you need your local one, though, then using System Settings is the simplest, swiftest way.

Leave a comment

Please note, comments must be approved before they are published