Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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 have a list of hosts in the network providing shares via SAMBA. How can I determine either IP address or the host name of one particular host, e.g. the one with the name “SASAK02”.

The output of smbtree is as follows

share|improve this question
up vote 13 down vote accepted

Try nmblookup <wins-hostname>.

share|improve this answer

You can install wireshark and start a scan on your network card.

sudo apt-get install wireshark
gksu wireshark

start monitoring your network-device (usually eth0 or wlan0), filter the result by "nbns" and you will see the IP in the upper window.

If it doesn't show up, go to your filemanager in the network tab where you see the share and actualize the sceen (usually F5)

A simpler solution is nmblookup (part of samba-common-bin) but it doesn't find all shares, for example:

nmblookup saura-pc1
share|improve this answer

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.