すべてのプロダクト
Search
ドキュメントセンター

Cloud Backup:NAS 共有ディレクトリの照会

最終更新日:Jun 22, 2026

このトピックでは、Windows および Linux サーバーで NAS 共有ディレクトリを照会する方法について説明します。

Windows での照会 (SMB)

  1. ローカルマシンにマウントされているリモートディレクトリを一覧表示します。
    1. コマンド プロンプトまたは PowerShell を開きます。
    2. net use を実行して、ローカルマシンにマウントされているすべての SMB 共有ディレクトリを一覧表示します。
    PS C:> net use
    New connections will be remembered.
    Status       Local     Remote                    Network
    -------------------------------------------------------------------------------
    OK           Z:        \\1xxx5\sharepath         Microsoft Windows Network
    The command completed successfully.
  2. リモートホスト上の共有ディレクトリを一覧表示します。
    1. コマンド プロンプトまたは PowerShell を開きます。
    2. net view \\[remote-host-ip] を実行して、リモートホスト上の SMB 共有ディレクトリを一覧表示します。
    PS C:> net view \\1xxx5
    Shared resources at \\1xxx5
    
    Share name    Type   Used as  Comment
    -------------------------------------------------------------------------------
    sharepath     Disk            
    test          Disk            Home Directories
    The command completed successfully.
  3. ローカルマシン上の共有リソースを一覧表示します。
    1. コマンド プロンプトまたは PowerShell を開きます。
    2. net share を実行して、ローカルマシン上の共有リソースを一覧表示します。
    PS C:> net share
    Share name   Resource                        Remark
    -------------------------------------------------------------------------------
    C$           C:\                             Default share
    D$           D:\                             Default share
    IPC$                                         Remote IPC
    ADMIN$       C:\Windows                      Remote Admin
    The command completed successfully.

Linux での照会 (NFS/SMB)

  1. NFS 共有ディレクトリを一覧表示します。
    • オプション 1: サーバーまたはクライアントで showmount -e [server_ip_or_hostname] を実行します。
      説明
      • hostnameサーバー上では、IP アドレスまたはホスト名を省略できます。
      • その他の showmount パラメーターには、次のものがあります。
        • -d: NFS クライアントがマウントしているディレクトリのみを表示します。
        • -a: クライアントのホスト名と、マウントされているサーバーのディレクトリを一覧表示します。

      例: showmount -e 192.168.0.214 を実行します。

      root@xxx:~# showmount -e xxx.xxx.x.xxx
      Export list for xxx.xxx.x.xxx:
      /home/read_only *
      /home/all_share *
      root@xxx:~#

      説明 アスタリスク (*) は、ディレクトリがすべてのクライアントからアクセス可能であることを示します。IP アドレスが表示されている場合、そのクライアントのみがディレクトリにアクセスできます。

    • オプション 2: サーバーで exportfs -v を実行します。
      root@xxx:~# exportfs -v
      /home/all_share
      		<world>(rw,wdelay,no_root_squash,no_subtree_check,sec=sys,rw,secure,no_root_squash,no_all_squash)
      /home/read_only
      		<world>(ro,wdelay,no_root_squash,no_subtree_check,sec=sys,ro,secure,no_root_squash,no_all_squash)
      root@xxx:~#
      root@xxx:~#
      root@xxx:~#
      root@xxx:~#

      説明 <world> は、ディレクトリが任意のホストからアクセスできることを示します。IP アドレスが表示されている場合、指定されたホストのみがディレクトリにアクセスできます。

  2. SMB 共有ディレクトリを一覧表示します。
    サーバーまたはクライアントで smbclient -L //[server_ip] -U [samba_username] を実行します。
    説明 smbclient コマンドが見つからない場合は、ツールをインストールしてください。たとえば、Ubuntu では apt install smbclient を実行できます。

    例: smbclient -L //192.168.0.215 -U test を実行します。

    説明 hostnameサーバー上では、IP アドレスの代わりにホスト名も使用できます。
    root@xxx:~# smbclient -L //xxx.xxx.x.xxx -U test
    WARNING: The "syslog" option is deprecated
    Enter WORKGROUP\test's password:
    	Sharename       Type      Comment
    	---------       ----      -------
    	print$          Disk      Printer Drivers
    	sharepath        Disk      Shared directory
    	IPC$            IPC       IPC Service (xxx)
    	test            Disk      Home Directories
    Reconnecting with SMB1 for workgroup listing.