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

We have a small LAN in my office, I use Ubuntu and other PCs have Windows XP and 7 - they have some shared folder on them.

How dp I get a list of Windows's shared folders on Ubuntu in Terminal (using the command line)?

share|improve this question
up vote 1 down vote accepted

Use smbclient, an "ftp-like client to access SMB/CIFS resources on servers":

smbclient -L hostname -U username

This will list all available shares to that user on the specified machine. More about smbclient is available in the manpage, just call man smbclient.

share|improve this answer

And on a Mac with the smbutil:

smbutil view [-options] //[domain;][user[:password]@]server

and as @slhck mentioned above use the man smbutil for more information for MacOSX's BSD flavored command line.

share|improve this answer
the semicolon, ";", must be escaped on the command line \; so it is not interpreted as the end-of-command character see – Scott Robert Schreckengaust Feb 6 '15 at 20:49
The question is about Windows and Ubuntu. . . How is a command on Mac useful in this situation? – zeel Feb 6 '15 at 20:59
@zeel As a Mac user I got redirected here when searching relevant terms, and this has helped me – andy Feb 11 at 14:03

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.