The IP address is used to communicate over the network using the LAN or Internet. Even we generally do not need to know our IP address on MacOSX in some cases we may require it. The IP address is used to communicate with a modem, router, or remote website. There are different ways to find out the IP address in MacOSX. In this tutorial, we examine GUI, and command-line interface methods to find out the IP address.
Find IP Address via GUI
The Network
configuration is provided via the System Preferences
GUI. First, click on the Apple
icon on the left upper corner of the desktop. On the menu click the System Preferences
like below.

On the System Preferences
screen click to the Network
like below.

In the Network, the screen selects the Network Interface you want to get an IP address. In the following example, we select the Wi-Fi
or wireless network interface. The selected interface IP address is listed in the main pain below.

Find IP Address via Command Line Interface
The IP address of the MacOSX can be displayed via the command-line interface. The command-line interface provides a practical way to list IP addresses with just a single command. The ip add
command can be used to list the IP address of the MacOSX.
$ ip add
An alternative command to list IP addresses with extra information like default gateway, network address, etc. is the ifconfig
command.
$ ifconfig
Find Public IP Address via Google
Previous methods describe finding the private IP address of the MacOSX. A private IP address is only used inside the LAN and can not be used for Internet communication. The Google
can be used to get the public IP address of the MacOSX. Just open Google and use the “what is my ip address” search term which lists your public IP address.
