This post was updated 537 days ago and some of the ideas may be out of date.

一、添加共享文件夹

打开 虚拟机 -> 设置 -> 选项 -> 共享文件夹

二、安装 Open VM Tools

Ubuntu、Debian 及相关操作系统

sudo apt-get install open-vm-tools open-vm-tools-desktop -y

RHEL、Fedora 和 CentOS

yum install open-vm-tools open-vm-tools-desktop -y

SLE 和 OpenSuSE

zypper install open-vm-tools open-vm-tools-desktop

三、挂载

查看共享的文件夹列表

vmware-hgfsclient

临时挂载目录

vmhgfs-fuse .host:/ 你的目录

# 例:
# root@debian:/# mkdir /mnt/windows
# root@debian:/# vmhgfs-fuse .host:/ /mnt/windows

永久挂载目录

# 编辑/etc/fstab文件加入以下内容
.host:/ 你的目录 fuse.vmhgfs-fuse allow_other 0 0

# 例子:
# root@debian:~# echo '.host:/ /mnt/windows/ fuse.vmhgfs-fuse allow_other 0 0' >> /etc/fstab
# root@debian:~# cat /etc/fstab
# .host:/ /mnt/windows/ fuse.vmhgfs-fuse allow_other 0 0