1,更新软件源
sudo apt update
2,安装工具包(带桌面图形功能)
sudo apt install open-vm-tools open-vm-tools-desktop -y
3,重启虚拟机生效
sudo reboot
4,验证是否安装成功(输出版本号就代表成功)
vmware-toolbox-cmd -v
5,共享文件夹



6,打开ubuntu系统终端,加载共享文件夹(若无hgfs文件夹需要创建)
vmhgfs-fuse .host:/ /mnt/hgfs -o allow_other
若想开机自动挂载(永久生效),需要编辑fstab文件
sudo nano /etc/fstab
在文件末尾添加一行:
.host:/ /mnt/hgfs fuse.vmhgfs-fuse defaults,allow_other 0 0
Ctrl+O保存,Ctrl+X退出
测试挂载是否有问题
sudo mount -a
没有报错就成功
之后重启虚拟机,/mnt/hgfs自动出现。
7,查看文件夹里的内容
ls /mnt/hgfs
8,若想打开这个共享文件夹
open /mnt/hgfs