mac ip address command code example Example 1: ip on mac ifconfig | grep "inet " Example 2: get ip mac terminal ipconfig getifaddr en0