How-To Geek

How to Share folders with your Ubuntu Virtual Machine (guest)

VMware Workstation provides a great ability to create shared folders so that your virtual machine can easily access data on your host pc. This saves a lot of time, especially when you are installing software that would otherwise take a long time to download.

For this to work, you will need to make sure that you have the vmware tools installed and running.

You can check to see if the vmware shared folders module is running by running this command:

lsmod | grep vmhgfs

If you get nothing then the mdoule is not loaded. You will need to load it with this command:

modprobe vmhgfs

If that gives you another error, then you don’t have the vmware tools installed, and you will want to make sure to install them before proceeding.

In VMware Workstation, go to the VM \ Settings window and then click on the Options tab. From here you can modify the shared folders.

Click the Add button, and you will be presented with a wizard. Click next, and you should see this screen:

The name field will become part of the mounted path in Ubuntu, so name it something short and to the point. For instance, this shared folder will be mounted on /mnt/hgfs/mydrive/

Select the host folder that you want to share and then click the Next button

If you are worried about the guest operating system messing with your files, you can select the read-only checkbox. I personally did so simply because I was worried about accessing in-use files.

You shouldn’t even have to restart your virtual machine. The folders should immediately show up under /mnt/hgfs

That’s all there is to it. Remember, if you have problems it’s probably because your vmware tools are not installed.

Tested on: Ubuntu Dapper, Ubuntu Edgy Eft

Update: If you have problems you might also want to check your firewall settings, which could be disabling communications between the virtual machine and your host computer. Thanks to burkhard in the comments for noticing this.

Lowell Heddings, better known online as the How-To Geek, spends all his free time bringing you fresh geekery on a daily basis. You can follow him on if you'd like.

  • Published 10/26/06

Comments (23)

  1. Burkhard

    I installed VMserver running on Kubuntu Edgy Eft and had the problem that vmserver didn’t activate the shared folders (I couldn’t even activate a share).
    So I set up Samba and share a folder on an FAT32-partition.
    I couldn’t connect from WinXP to that share, neither configuration worked.

    Reason: I use ZoneAlarm under XP and forgot to set a secure zone for all IPs of the local network.
    This took me some hours to find out.

    Just a hint, if anybody else runs into that issue

    greetings from Germany


  2. The Geek


    Thanks for the note, I’ve added a line to the article as well.

  3. jpl

    I’m running Kubuntu Edgy Eft on VM Workstation 5.5.3 .
    I installed the VM Tools for 5.5.3.
    I was able to configure and use a shared folder but now it does not work anymore. I tried several things: restarting the VM, disabling/reenabling the shared folder, …
    One thing is that I apparently do not have the “vmhgfs” kernel module. Is it required with 5.5.3 ? How did it work on the first place then ?
    Do you have any hint to solve this ?

  4. Chuck Gregory

    I have a 64-bit version of Feisty running in a VMware virtual machine under Vista Home Premium 32-bit. It seems to be working very well and it runs much faster than the 32-bit version of Feisty that I have set up as a shared boot (i.e., one that runs standalone rather than under Vista).

    The thing is…

    VMware tells me that my installation doesn’t support VMware tools. I’ve managed to do some sharing anyway, but it’s a real pain to set it up. Do you know if there’s a way around this, perhaps some sort of install directly on on the virtual Ubuntu system?


  5. Planet Malaysia

    This is cool! I was looking for this! Anyway, you still can use samba, FTP, and etc.

  6. Ying

    To jpl:

    I might an answer for you. Check out this webpage:

  7. Ying

    For the line “-vi compat_slab.h”, I used “-gedit compat_slab.h” instead because gedit works better in my Ubuntu 7.0.10.

    Good luck!

  8. jose

    Tested on
    Host : Win XP
    Guest Ubuntu 8.10 Ibex
    VMWare Tools 7.8.4-126130
    VMWare Workstation 6.5.1-126130

    It works.

  9. Kre Jonsson

    I installed Ubuntu 8.10 in VMWare 6.0.3 and had no problems for a while. When trying to share folders my luck changed. It revealed that vmtools did not compile the vmhgfs but continued with installation and succeeded with most or all other things. This page helped me to determin this. Thansk very much for this page.

    By upgrading VMWare to 6.5.2 and reinstalling Ubuntu 8.10 cleanly I got a flawless installation with filesharing immediately functioning.

  10. Steven Tuxfield

    Thanks a lot for this wonderful blog. Now I can share files between Win XP and my Linux virtual machine.


  11. admin

    Here is additional info on how you can achieve full read/write permission

  12. Ricardo

    Very good article!! Thanks!

  13. buddz

    hi im baciacally doin wat uve said but da other way round, im usin linux as my host n ubuntu for vmware. i have made a shared folder as instructed but i cant seem to find if on windows, can anyone help…..


  14. Stefania

    Thank a lot!!!!! You save my life!!

  15. tom

    Thanks for the help

  16. thanks

    thanks :)

  17. kane

    Thanks man , simple-clear-crisp & no clutter tutorial.

    I even read the “installing ubuntu on win7 ” .that was also a good tutorial.
    again Thanks a lot

  18. kyungsu kim

    It works great.. Thanks a lot from Korea.
    kyungsu kim

  19. Majed

    I’d like to add something that once you have finished the previous steps, you should execute the following:

    /etc/init.d/networking stop
    rmmod pcnet32
    rmmod vmxnet
    modprobe vmxnet
    /etc/init.d/networking start

    to make it activated.

    Thank you for our dear author.

  20. Antony Hu

    This giude worked brilliant for me, thanks geeks who work for this site xD

  21. vani

    I have followed the same steps but nothing is coming under FileSystem/mnt :)

  22. sameer

    i done same staps with in this site but i could not get success……..i mean i,m not use file & folder in ubuntu within other window…….?

  23. Tomas Liubinas

    Many thanks. At least now I know that vmhgfs module is not installed on my system.

More Articles You Might Like

Enter Your Email Here to Get Access for Free:

Go check your email!