macOS ip link shows all of the interfaces and their IPs ifconfig ipconfig getifaddr en0 ifconfig | grep "inet "| grep -Fv127.0.0.1| awk '{print $2}'