首先要确保VMware虚拟机上进行了正确的共享文件夹设置,操作如下
菜单栏 -> 虚拟机 -> 设置 -> 选项 -> 共享文件夹 -> 总是启用 -> 添加(我挂载的共享文件夹为本地的Ubuntu18和shareDocker) ->确定
然后进入虚拟机中的命令行
[root@localhost zz]# mount -t vmhgfs .host:/CloudMusic /mnt/hgfs
mount: 未知的文件系统类型“vmhgfs”[root@localhost zz]# vmware-hgfsclient
shareDocker
CloudMusic
[root@localhost zz]# vmhgfs-fuse .host:/ /mnt/hgfs
[root@localhost zz]# cd /mnt/
[root@localhost mnt]# ls
hgfs share
[root@localhost mnt]# cd hgfs/
[root@localhost hgfs]# ls
CloudMusic shareDocker
注:挂载成功之前我还执行了下方的三个命令,不知道有没有影响
yum install open-vm-tools
yum install cifs-utils
yum update kernel