MacOS is a Linux-like operating system where that uses a lot of common commands. IP Address is used to address a host in a network for communicating with other hosts or computers. We may need to get the current MacOS IP address via terminal or command line interface. In this tutorial, we examine how to find MacOS IP addresses via terminal or command line interface.
Find IP Address with ifconfig Command
ifconfig command is the most popular command used to get the current IP-related configuration. We can use the ifconfig command in order to find MacOS IP address via terminal.
Find IP Address with ip address Command
Most MacOS operating systems especially the recent ones provide the
ip address command in order to print the current IP address of the MacOS.
$ ip address
Alternatively, we can use this command in a short version like the one below.
$ ip add