vmware虚拟机ubuntu-server开机共享目录

在vmware中安装ubuntu-server后,通过vmware的设置选项共享文件夹,然后在ubuntu-server中可以通过如下命令进行挂载:

su - root
mkdir -p /mnt/shared
vmhgfs-fuse .host:/ /mnt/shared -o allow_other

#vmhgfs-fuse .host:/ /mnt/shared 挂载后仅允许root操作,其他用户会因权限问题操作失败

也可以设置在ubuntu-server启动的时候,通过编辑/etc/fstab实现开机自动挂载:

su - root
vim /etc/fstab
#自动挂载共享目录
.host:/ /mnt/shared fuse.vmhgfs-fuse allow_other 0 0