which Linux command allows to browse all available smb shares in the network?

I want to browse all available smb shares in the network, like clicking the "network" in nautilus then all shares are shown, using command line

the closest one I got is smbclient -L SRVNAME, which lists all shares in SRVNAME as well as all other servers in the workgroup and other workgroups available, but it requires me knowing at least the correct SRVNAME


Solution 1:

Use smbtree command to see all the clients & shared folders in a tree fashion.

Solution 2:

I use findsmb It works similar to smbtree.

  • smbtree will show you a list of all available workgroups and clients under those work groups.

$smbtree
Enter usernames's password:

WORKGROUP1
    \\host1         
        \\host1\ADMIN$          IPC Service (SMB Server)
        \\host1\IPC$            IPC Service (SMB Server)
        \\host1\print$          
        \\host1\print           Printer
    \\host2                 
        \\host2\C$              Default share
        \\host2\ADMIN$          Remote Admin
        \\host2\Z$              Default share
WORKGROUP2
  • smbfind will show you a list of all client that are advertising them selves as available.

$findsmb

                            *=DMB
                            +=LMB            

IP ADDR | NETBIOS NAME | WORKGROUP/OS/VERSION

192.168.1.1 DOMAINHOST *[DOMAIN] [Windows 5.0] [Windows 2000 LAN Manager]