I don't think there is a single command to do this. One hack would be to do a ping scan or a broadcast ping on the subnet and then query the arp table for the IP address of the MAC address.
What is a MAC address?
Obviously not an ideal solution. Here nmap will do a ping scan and populate your arp cache. You could try replacing nmap with a broadcast ping, but that probably isn't as reliable. The other methods presented here were unreliable, e. I just makes rapid arp requests to find the ip, then caches what it finds. The code is on github. Neal's answer takes indeed too long. The trick to make this work is to check arp table after each ping.
get IP and/or computer name from MAC address?
This also fixes the root problem : no need. I did it in Java see threadedScan here because I was on windows and needed a solution which wouldn't spawn thousands of cmd prompts while trying to ping with start command.
- mac scanner software free download?
- lion - Get computer name from IP-address - Ask Different!
- Convert Host Name to IP Address or Vice Versa!
- Details of Computer Using This Web Service;
- how do i restart mac in windows.
Learn more about Teams. Ask Question. Asked 6 years, 8 months ago. Active 1 year, 8 months ago. Viewed 39k times. And to note, the ping command first calls gethostbyname in it's code, to resolve the ip of the hostname. DuBuisson Nov 25 '12 at I'm not seeing that it can work the other way. Example: nmap -sP Neal Neal 3, 4 4 gold badges 29 29 silver badges 29 29 bronze badges.
This achieves what I set out to do. After all of the above, I'm thinking it's not unreasonable that my program just use the remote machine's hostname. For example, if I know the IP address is From the Terminal. This returns the name even if it has all sharing settings turned off and thus not showing via Finder.
For example, in my network I get the following where I know the IP-address and the first part of the returned name is the computer's name. It depends on the actual name of the computer if the network name is exactly the same, as in your example, I guess it would become Jacobs-MacBook. Without further access to the host e.
FastResolver - Host Names/IP Addresses/MAC Address Scanner
The computer name in macOS is not necessarily indentical to the hostname or the Bonjour name! On a newly installed consumer system no hostname is set.
Admin's iMac Admins-iMac. Without a name record for the remote Mac in your hosts file or on a DNS-server in your local or a public network neither of the tools mentioned in the other answers arp, ping, host can be used to resolve the hostname. In Finder, go to your computer which should be listed on the left sidebar under Devices.
Then double-click on Network. This will show you all of the other computers on your network that are browsable. Just Ping that ip address with -a option. It will show you the computer name. Example ping -a Sign up to join this community. The best answers are voted up and rise to the top.
Determine IP Address From a MAC Address
Home Questions Tags Users Unanswered. Get computer name from IP-address Ask Question. Asked 6 years ago. Active 2 years, 1 month ago.