How do I mount shared folders in Ubuntu using VMware tools?
Most other answers are outdated. For Ubuntu 18.04 (or recent Debian distros), try:
sudo vmhgfs-fuse .host:/ /mnt/hgfs/ -o allow_other -o uid=1000
If the hgfs
directory doesn't exist, try:
sudo vmhgfs-fuse .host:/ /mnt/ -o allow_other -o uid=1000
You may have use a specific folder instead of .host:/
. In that case you can find out the share's name with vmware-hgfsclient
. For example:
$ vmware-hgfsclient
my-shared-folder
$ sudo vmhgfs-fuse .host:/my-shared-folder /mnt/hgfs/ -o allow_other -o uid=1000
If you want them mounted on startup, update /etc/fstab
with the following:
# Use shared folders between VMWare guest and host
.host:/ /mnt/hgfs/ fuse.vmhgfs-fuse defaults,allow_other,uid=1000 0 0
I choose to mount them on demand and have them ignored by sudo mount -a
and the such with the noauto
option, because I noticed the shares have an impact on VM performance.
Requirements
Software requirements may require installing the following tools beforehand:
sudo apt-get install open-vm-tools open-vm-tools-desktop
Others have claimed the following are required:
sudo apt-get install build-essential module-assistant \
linux-headers-virtual linux-image-virtual && dpkg-reconfigure open-vm-tools
I have set up on Windows 7 host with Ubuntu 11.04 Desktop with VMware Tools installed on.
Virtual Machine settings
- Folder sharing = Always Enabled
- Make sure you have at least one Folder shared between the host and guest
On the Ubuntu Guest
check /mnt/hgfs that you can access your shared folder.
If you don't see your shared folders (automounted) inside
/mnt/hgfs
, run VMware configuration tools:sudo vmware-config-tools.pl
update your fstab using the details below:
gksu gedit /etc/fstab
(I am using ubuntu desktop so use other text editor to enter the next line at the end of the file)
.host:/{shared-folder} /{path-to-mount-on} vmhgfs defaults,ttl=5,uid=1000,gid=1000 0 0
Restart your vm (You may need to restart few times or get error message saying unable to mount just skip the error and restart)
run vmware-config-tools.pl, AGAIN!
Refer: http://www.laotudou.com/vmware-player-share-folder.html