When you enable a shared folder, /mnt/hgfs you can mount one or more of the directories/subdirectories in the shared folder to any location in the file system, in addition to the default location.
Use the mount command to mount a subdirectory of all shares, a share, or a share to any location on the file system.
load Command Syntax
Command |
Description |
< Samp class= "Codeph" >mount-t Vmhgfs. host://home/user1/shares |
load all shares to /home/ User1/shares |
< Samp class= "Codeph" >mount-t Vmhgfs. Host:/foo/tmp/foo |
foo Shared mount to /tmp/foo |
mount -t vmhgfs .host:/foo/bar /var/lib/bar |
footo mount a subdirectory in a share bar to /var/lib/bar |
In addition to mount the standard syntax, you can use specific VMware options. To obtain usage information for the host-client file system option, type the command /sbin/mount.vmhgfs -h .
When you install VMware Tools etc/fstab , an entry is added to specify the location of the shared folder. You can edit the file to change or add entries. For example, to automatically mount at startup, edit the /etc/fstab and add the following line:
. host://mnt/hgfs Vmhgfs defaults 0 0
The VMware Tools Service script loads the driver that performs the mount operation. If the mount fails, a message about the load HGFS share is displayed.
Note
If the shared folder is disabled or the share does not exist, the mount operation will fail. You are not prompted to rerun the VMware Tools vmware-config-tools.pl Configuration program.
Related Topics optimize read and write access to Linux shared files use permissions to restrict access to shared files in Linux clients related concepts support for client operating system related tasks for a shared folder enable shared folders for virtual machines for other user-created virtual machines for the Windows View shared folders in Client changes shared folder properties change the folders that the virtual machine can share to disable folder sharing for the virtual machine
Mount a shared folder in a Linux client