Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
up vote 6 down vote accepted

If you're using Lion, you can use smbutil:

usage: smbutil [-hv] subcommand [args]
where subcommands are:
 help       display help on specified subcommand
 lookup     resolve NetBIOS name to IP address
 status     resolve IP address or DNS name to NetBIOS names
 view       list resources on specified host
 dfs        list DFS referrals
 identity   identity of the user as known by the specified host

For example (assuming is a valid IP on your network):

smbutil lookup
smbutil status bill-pc

If you're using Snow Leopard, you should be able to use nmblookup:

nmblookup -A
nmblookup bill-pc
share|improve this answer
Thanks! That's exactly what I wanted! – MrMage Mar 1 '12 at 22:08

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.