Linux挂载windows共享目录

1.开启vmware共享文件配置

Vmware >>虚拟机>>设置>>选项>>共享文件夹
添加需要在windows共享的目录
Linux挂载windows共享目录

2.安装VM增强工具

yum -y install open-vmware-tools
Linux挂载windows共享目录

3.查看共享目录

vmware-hgfsclient
Linux挂载windows共享目录

4.创建需要挂载的共享目录

mkdir /data
mkdir /data/www
Linux挂载windows共享目录

5.挂载

mount -t vmhgfs .host:/www /data/www
Linux挂载windows共享目录
如果报错…执行下面
/usr/bin/vmhgfs-fuse .host:/www /data/www -o subtype=vmhgfs-fuse,allow_other
Linux挂载windows共享目录

6.在D:\www\下创建aa.txt文件

Linux挂载windows共享目录
ll /data/www
Linux挂载windows共享目录
共享已完成 windows D:\www -> Linux /data/www

7.自启生效

在/etc/fstab中最后一行补上:
.host:/www /data/www fuse.vmhgfs-fuse allow_other,defaults 0 0
Linux挂载windows共享目录

8. reboot 重启

Linux挂载windows共享目录
ll /data/www 共享已生效
Linux挂载windows共享目录