So now you’ve got Ubuntu installed in a Virtual Machine, you’ll probably find it useful to have a shared folder with the Windows host OS.

  1. Create a folder in your Windows file system that you want to use as the share. Make sure it’s in a location where your user account has full access rights. I’ve created one in My Documents as it will also be backed up by my Mozy Home account
  2. Power down the VM shutting down Ubuntu
  3. Select your VM in VMware Player and click Edit virtual machine settings
    VMware Player: edit virtual machine settings
  4. In the Options tab click Shared Folders in the left hand pane
    VMware Player: settings & options
  5.  Click Always enabled in the right and pane and click Add…
  6. This will take you into the “Add Shared Folder Wizard”
    VMware Player: Add Shared Folder Wizard
  7. Click Next and follow the prompts selecting the folder you created in Step 1
  8. Also name the share – this is the name that the folder will have in Ubuntu
  9. You will come back to the Settings screen with your share added
    VMware Player: folder sharing enabled
  10. Click OK to close the settings
  11. Play the VM to boot Ubuntu
  12. Shared folders in Ubuntu appear in the location /mnt/hgfs but you probably won’t be able to see it
  13. To check to see if Ubuntu is aware that there is a shared folder available run this command in a terminal window
    1vmware-hgfsclient

    This will output the share name into the terminal window, e.g.

    1$ vmware-hgfsclient
    2WinLinShare
  14. So far so good! Now we need to run the VMWare config tools. In terminal enter
    1sudo vmware-config-tools.pl
  15. Follow the prompts, accepting the default values
  16. Check to see that your folder is now showing in the /mnt/hgfs directory
    1dir /mnt/hgfs
    2WinLinShare

Share folder permissions across Ubuntu Virtual Machine & Windows Host

Finally, here’s a little trick to share folder permissions across Ubuntu Virtual Machine & Windows Host. This also gives you quick access to the folder from your Ubuntu desktop. Enter this into terminal:

1ln -s /mnt/hgfs/shared-directory ~/Desktop/Name-of-the-folder

And there you have it, your Windows folder is now fully accessible and usable from your Ubuntu VM. The script files for the rest of my Knowing Node series will be based in this directory.
Shared folder on Ubuntu desktop