I'd like to find out the computer name of a Windows PC (like the name shown in the 'Shares' section of the Finder, e.g. bill-pc) given only its IP address. nslookup
doesn't do the trick.
I'm also interested in the reverse lookup: given its Windows name, how can I find out its IP address? ping bill-pc
or ping bill-pc.local
seems not to work in some cases.
Best Answer
If you're using Lion, you can use
smbutil
:For example (assuming 192.168.1.9 is a valid IP on your network):
If you're using Snow Leopard, you should be able to use
nmblookup
: