Windows下网络共享文件夹挂载到wsl系统

  • 概念解析

  • samba
  • mount 命令 -t cifs -t drvfs
  • SMBv3
  • cifs-utils
  • modprobe
  • 错误

    1. mount point does not exist.

      挂载之前,需要先建立挂载目录,即需要的 mkdir /mnt/x

    2. unknown filesystem type ‘cifs’.
      apt-get update
      apt-get install cifs-utils
      
    3. mount error: cifs filesystem not supported by the system
      sudo modprobe cifs
      

      但是会遇到问题4

    4. modprobe: FATAL: Module cifs not found in directory /lib/modules/4.4.0-18362-Microsoft

      From Kali on windows CIFS support, WSL now supports drvfs.

      sudo mount -t drvfs \\server\directory \mountpoint
      
  • 总体方案

    前提:windows10+wsl(ubuntu18.04)

    apt-get update
    apt-get install cifs-utils
    sudo mount -t drvfs //server/directory /mountpoint
    

    最后一步,可以先将ip形式的网络文件夹映射为Windows的一个盘(比如H盘),然后直接mount H: /mountpoint

  • Reference

  1. mount: unknown filesystem type ‘cifs’
  2. [linux]wsl环境挂载window共享文件
  3. centos samba 挂载
  4. mount.cifs gives me “mount error: cifs filesystem not supported by the system”
  5. Kali on windows CIFS support

猜你喜欢

转载自blog.csdn.net/The_Time_Runner/article/details/108555884