Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

On Ubuntu, how can I get a list of all windows machines/shares on the network? I tried smbclient, but it only seems to list the shares of a known machine.

share|improve this question

Use smbtree:

marco@hostname:~$ smbtree
Enter marco's password:
    \\HOST_1        hostname
        \\HOST_1\RESOURCE1    comment 
        \\HOST_1\RESOURCE2    comment 
    \\HOST_N        hostname
        \\HOST_N\RESOURCE1    comment 
        \\HOST_N\RESOURCE2    comment 
share|improve this answer
Please give an example of how smbtree works and possibly simple code to follow. – KronoS Jan 24 '11 at 20:24
Ok, I'll update my answer but usually smbtree is used without options. – marco Jan 24 '11 at 22:02
You can use smbtree -N to avoid using password. – MestreLion Feb 8 '12 at 17:17

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.