This topic describes how to query the shared directories of a NAS file system on a Windows or Linux server.
Query the shared directories of an SMB file system on a Windows server
Query the remote directories that are mounted on a local host.
Open the Command Prompt or PowerShell.
Run the
net usecommand to query all SMB shared directories that are mounted on the local host.
An output similar to the following example is returned:

Query the shared directories of a remote host.
Open the Command Prompt or PowerShell.
Run the
net view \\[IP address of the remote host]command to query all SMB shared directories of the remote host.
An output similar to the following example is returned:

Query the devices of the local host.
Open the Command Prompt or PowerShell.
Run the
net sharecommand to query the disks of the local host.
An output similar to the following example is returned:

Query the shared directories of an NFS or SMB file system on a Linux server
Query the shared directories of an NFS file system.
Solution 1: Run the
showmount -e [server IP address or hostname]command on the server or client.NoteIf you run the preceding command on the server, you do not need to specify the IP address or
hostname.You can specify the following parameters when you run the
showmountcommand:-d: displays only the directories that have been loaded by the NFS client.-a: displays the shared directories on the server and the mount targets on the client.
For example, you can run the
showmount -e 192.168.0.214command.An output similar to the following example is returned:
NoteAn asterisk (*) indicates that the shared directory allows access from all users, as shown in the preceding figure. If an IP address is displayed, the shared directory allows access from only the specified IP address.
Solution 2: Run the
exportfs -vcommand on the server.An output similar to the following example is returned:
Note<world> indicates that the shared directory allows access from all hosts, as shown in the preceding figure. If an IP address is displayed, the shared directory allows access from only the specified IP address.
Query the shared directories of an SMB file system.
Run the
smbclient -L //[server IP address] -U [samba username]command on the server or client.NoteIf the
smbclientcommand does not exist, install the tool first. For Ubuntu, you can run theapt install smbclientcommand.For example, you can run the
smbclient -L //192.168.0.215 -U testcommand.NoteIf you run the preceding command on the server, you do not need to specify the IP address or
hostname.An output similar to the following example is returned:
