Monday, February 21, 2011

How to share a folder on virtual box with Windows Host and Ubuntu Guest

Start Ubuntu on Virtual Box then follow these steps:
  1. On the virtual box menu go to Device > Shared Folder
  2. Add a new shared folder
  3. Select the windows path to the folder you want to share and then give a name to the folder (f.i. MY_WINDOWS).
  4. Select "Permanent" to permanently share this folder.
  5. Now is the time to mount this shared windows folder on a ubuntu folder. So lets create a folder in our home directory and lets name it WINDOWS_FOLDER
  6. from the command line:
    sudo mkdir /home/danilo/WINDOWS_FOLDER
  7. So now that we created the folder on Ubuntu lets mount on it the windows folder:
    sudo mount.vboxsf MY_WINDOWS /home/danilo/WINDOWS_FOLDER 
  8. Done!
Now you can write/read to/from this folder

If you want to mount this folder when ubuntu start open a terminal and write:

sudo nano -w /etc/rc.local
Add this line to the file:
mount.vboxsf MY_WINDOWS /home/danilo/WINDOWS_FOLDER

<press ctrl-x to save>

Ciao

No comments: