让 vmware 共享文件夹自动加载的办法

因为新电脑不能直接安装 linux ,只能使用 vmware 内安装虚拟机。安装 vmware 扩展工具,才能使用图形加速,共享目录等功能。

apt install open-vm-tools

设置了 共享文件夹 后,每次开机后都要连接共享,如果要实现自动加载,在 /etc/fstab 中添加以下代码:

.host:/share_name /mnt/hgfs/access fuse.vmhgfs-fuse allow_other,uid=1000,gid=1000,auto_unmount,defaults 0 0

share_name 是主机共享出来的目录名,/mnt/hgfs/access 是虚拟机内的访问路径。