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.
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
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.