---
title: "在CentOS 7 中使用Vmware提供的共享文件夹"
author: "45571845"
date: "2019-10-23T16:05:39Z"
tags: []
categories: ["操作系统"]
slug: "centos-7-vmware"
draft: false
lastmod: "2019-10-23T16:05:39Z"
id: 2509177
url: "https://j2ees.iteye.com/blog/2509177"
---

安装vm tool （vm15版本，默认都会安装这个，所以可以跳过）

```
mount /dev/cdrom /home/tmp
cp /home/tmp/VMwareTools-9.6.0-1294478.tar.gz /tmp
cd /tmp
tar -zxvf VMwareTools-9.6.0-1294478.tar.gz
cd vmware-tools-distrib
./vmware-install.pl
```

有/mnt/hgfs但没有共享文件的解决方法：

```
mount -t vmhgfs .host:/  /mnt/hgfs
Error: cannot mount filesystem: No such device
```

 

这时不能用mount工具挂载，而是得用vmhgfs-fuse，需要安装工具包

```
yum install open-vm-tools-devel -y
有的源的名字并不一定为open-vm-tools-devel(centos) ，而是open-vm-dkms(unbuntu)
执行：vmhgfs-fuse .host:/ /mnt/hgfs
```

 

此时进入/mnt/hgfs就能看到你设置的共享文件夹了。