macOS’ Terminal application is a mystery to most Mac users. Many of us never use it and are daunted by the prospect of opening it and typing in commands. But when you know how to use it, it can supply some very useful information about your Mac, as well as allow you to quickly run commands that can do all sorts of useful tasks. For example, you can use it to install software that doesn’t have its own bundled installer or even a graphical user interface. In this article, we’ll show you how to use Terminal to uncover information about your Mac’s network interface and connection. We’ll show you how to run Mac IP address Terminal command — ipconfig.

What is IP?

In this case, IP means Internet Protocol — the system of numbers used to give every device connected to the internet a different address. Your Mac has two IP addresses. One is supplied by your router and is only visible on your local network. The other is an external address that is visible to any server you connect to on the internet unless you use a proxy server, VPN, or relay service.

What is ipconfig command?

ipconfig is a tool that communicates with the IPConfiguration agent on your Mac to retrieve and set parameters related to IP configuration. Depending on how you use the ipconfig command, it displays information about your Mac’s network connection, including your IP address, subnet mask, and default gateway. However, by adding parameters to the command, you can view lots more information like details of DNS servers and the date and time when your Mac received its current IP address. ipconfig can also be used to make changes to network configuration, such as blocking network access in some circumstances. You should not use it for that, as you make changes you can’t undo.

Tip: How to improve the performance of your Mac easily

Terminal is a great tool for running all kinds of commands as long as you know what you’re doing. It’s not so great if you want your Mac to run faster or more smoothly. However, there is a tool that is really great at that — Smart Care in CleanMyMac. With one click, it will scan your Mac for junk files, duplicate downloads, and malware. It will also look for opportunities to boost your Mac’s performance and search for updates to apps installed on your Mac. When it’s finished scanning, you can choose to implement all of its recommendations with just a few more clicks. Or you can review what it has found and decide for yourself what tasks to run and what to leave for now. You can download CleanMyMac for free here.

CleanMyMac - Smart Scan complete



How to run ipconfig command on your Mac

If you just type ipconfig in Mac Terminal, it won’t do anything except display a message telling you that ‘ipconfig’ needs to be followed by a command and an argument. It then displays examples of commands. A good place to start is to type man ipconfig and press Return. That will display the manual for ipconfig, which explains more about the commands and what they do.

To see your Mac’s local IP address if it’s connected by, use this command: ipconfig getifaddr en0

If it’s connected by ethernet, use ipconfig getifaddr en1

Tip

The ‘man’ command used above is a Unix command that can be used with lots of services. ‘man’ is short for manual, and when you use it in conjunction with a tool or service like ipconfig, it displays information about how to use the tool and shows you commands and arguments.

If you want to see your Mac’s public-facing IP address, you need to use an external service. You can use this command in Terminal: curl https://ipinfo.io/ip




To see a summary of all the information related to your network connection, including DNS address and DHCP lease details, use this command for Wi-Fi: ipconfig getsummary en0

For an ethernet connection, use ipconfig getsummary en1

ipconfig is a tool built into your Mac that can be accessed from the command line in Terminal and that can be used to view information on, and set parameters for, your Mac’s network connection, including details of its internal IP address. Follow the steps above to run ipconfig for Mac.