How to Get IP Address in Terminal on Mac?
Finding your IP Address on Mac using Terminal
To find your IP address on a Mac via Terminal, follow these steps:
Steps to Get Your IP Address
- Step 1: Open the Terminal application from Applications > Utilities or use Spotlight search.
- Step 2: Run the following command to display network configuration:
ifconfig | grep inet
This will show the IP addresses associated with each network interface.
Get Specific IP Address
To get the IP address of your Wi-Fi interface, use the command:
ipconfig getifaddr en0
For Ethernet, use:
ipconfig getifaddr en1
Conclusion
Using these commands, you can quickly find your IP address on Mac via Terminal.