VMware 15.5.7 Centos 7.5 与 Window 实现共享文件夹

实现共享需要安装VMTools工具

1、开启共享文件夹

开启共享文件夹

2、查看共享文件夹

[root@hadoop101 ~]# cd /mnt/hgfs/
[root@hadoop101 hgfs]# ll
total 4
drwxrwxrwx. 1 root root 4096 Apr 15 10:10 Window-Centos-Shared
[root@hadoop101 hgfs]# cd Window-Centos-Shared/
[root@hadoop101 Window-Centos-Shared]# ll
total 4
-rwxrwxrwx. 1 root root 3005 Nov 27 14:23 website.log

此时在CentOS 7中就能看到物理机上面共享的文件夹了

3、查看 vmware-tools 文件

VMware默认的共享路径是在/mnt/hgfs,这是写死在VMware Tools的脚本里的,我们可以从/etc/init.d/vmware-tools查到

[root@hadoop101 ~]# vim /etc/init.d/vmware-tools
vmhgfs_mnt="/mnt/hgfs"
#Mount all hgfs filesystems" 
 vmware_mount_vmhgfs() {
  if [ "`is_vmhgfs_mounted`" = "no" ]; then
   if [ "`vmware_vmhgfs_use_fuse`" = "yes" ]; then
    mkdir -p $vmhgfs_mnt
    vmware_exec_selinux "$vmdb_answer_BINDIR/vmhgfs-fuse \
     -o subtype=vmhgfs-fuse,allow_other $vmhgfs_mnt"
   else
     vmware_exec_selinux "mount -t vmhgfs .host:/ $vmhgfs_mnt"
   fi
 fi
 }
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容