Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Is there possible to list all shared folders (with their physical locations) from command line?

share|improve this question
2  
Sharing using the same OS? Are using Samba? –  Mitch Oct 10 '12 at 9:53
    
both, if possible –  ts01 Oct 10 '12 at 10:17
add comment

2 Answers 2

gvfs-mount -l

GVFS is the virtual filesystem for the Gnome desktop that allows access to shared drives via SMB, FTP, WebDav, and SFTP. Accessed shares are mounted under ~/.gvfs/, you can see them there as well.

The command above lists all attached external drives, and network shares, e.g.:

$ gvfs-mount -l
Drive(0): 1.5 TB Hard Disk
[snip]
Mount(0): public on fileserver -> smb://fileserver/public/
  Type: GDaemonMount
Mount(1): SFTP for bert on server.example.com -> sftp://bert@server.example.com/
  Type: GDaemonMount
Mount(2): WebDAV as bert on server.example.com -> davs://bert@server.example.com/dav
  Type: GDaemonMount

If you add the option -i you get even more information.

share|improve this answer
add comment

For samba shares we have a set of utilities that come with the samba Install samba suite:

  • smbtree

    smbtree is a smb browser program in text mode. It is similar to the "Network Neighborhood" found on Windows computers. It prints a tree with all the known domains, the servers in those domains and the shares on the servers. Manpage

  • smbstatus

    smbstatus is a very simple program to list the current Samba connections. Manpage

    By invoking the following a list of shares will be displayed:

    smbstatus --shares
    

See also: Manpage of samba

share|improve this answer
add comment

Your Answer

 
discard

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.