ubuntu20 server共享文件夹设置

 

 

进入终端界面,执行一下命令:

vmware-hgfsclient

如果看到cpp,说明可以挂载

执行命令:

sudo mkdir -p /mnt/hgfs

创建共享文件夹专用的挂载目录

执行以下命令挂载共享文件夹:

sudo /usr/bin/vmhgfs-fuse .host:/  /mnt/hgfs -o subtype=vmhgfs-fuse,allow_other

至此即可访问主机上的共享文件夹,继续执行:

ls -l /mnt/hgfs

就可以看到共享文件夹cpp了。

上述设置重启系统时会丢失,如果要在开机时自动挂载共享文件夹,则需要更改/etc/fstab文件夹,在末尾加:

 .host:/  /mnt/hgfs fuse.vmhgfs-fuse allow_other,defaults 0 0

posted @ 2022-08-03 00:16  疯狗强尼  阅读(751)  评论(0编辑  收藏  举报