Get ip address for mac os x

broken image

On a newly installed consumer system no hostname is set. The hostname is usually related to or used with DNS, NIS, hosts file or similar methods of name resolution. ComputerName is the user friendly name, LocalHostname is the Bonjour name - both also visible in System Preferences > Sharing - and HostName is the hostname of the device. The computer name in macOS is not necessarily indentical to the hostname or the Bonjour name! You can simply check this with scutil -get. iTunes Music Sharing/File Sharing) you can't get the computer name based on the IP-address.

broken image

ssh or ARD) and no service running on it (e.g.