Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to have a directory which is accessible on both Windows 7 installed on Ubuntu host, and the Ubuntu as well.

So I have installed the Virtualbox additions on both Windows and Ubuntu.

Then in Ubuntu:

sudo mkdir /media/win7share
sudo mount -t vboxsf win7share /media/win7share

I get:

/sbin/mount.vboxsf: mounting failed with the error: No such device
  • What do I need to type in Shared folders in Virtualbox Manager settings?
  • What do I need to set up on Windows?
share|improve this question
See also this answer and another answer on Virtual Box shared folders. – Takkat Feb 10 '12 at 21:21
run this command on the Host or Guest OS 'sudo usermod -g vboxsf username'? – Phill Pafford Sep 6 '12 at 12:44
up vote 5 down vote accepted

Ok, after You edited Your question I am editing my answer:

Assuming that the host is Ubuntu.

Choose the folder that is to be shared (the same way as below - open VM settings on Your host and choose). Lets say it is (folder on Your host which You want to see from Win7 guest):


This tutorial covers the answer. After adding Your Ubuntu folder to shared start or reboot Your Win7 VM You should search Your local area network (in Win7 guest; wait until it has searched it - the green progress bar). After that network disk should appear.

enter image description here

On my PC it was found with no further steps. In case of problems please refer to the tutorial.

Assumed You have Win7 host and Ubuntu as guest.

First go to Your virtual machines settings:

enter image description here

Add the folder You wish to share and name it (it will automatically name it). Here the Win7 path to my folder is C:\Misery and the name is Misery

Then mark Auto mount option to mount it always when starting Your VM.

enter image description here

And basically that's it. Now start Your virtual machine. This tutorial explains the rest, in short You need to create the folder that will be Your mounting point (on the guest). Let's say it will be GMisery on Your ubuntu. So Create it in Your user directory. So now we have existing empty folder on guest OS:


Next open Your terminal and write:

sudo mount -t vboxsf -o uid=1000,gid=1000 Misery /home/misery/GMisery

Now it should work. At least id does on my PC :] If no error occured, logout and login again and it should be done.

Please read attached tutorial also.

And in general it is a good idea to install on Your host VB extension pack. However it has no influence on the topic discussed here.

Best Regards

PS.: If that will not work, please tell us what version of VB do You have, did You install it from repository or downloaded from Oracle website.

share|improve this answer
Dzięki :) But the problem is, that I can't add new shared dir in the VirtualBox config. The Ok button is grayed out, like on your screeshot. The browser shows only the Ubuntu filesystem, I can't see any Windows dirs (I have Windows inside Ubuntu host). – takeshin Feb 10 '12 at 15:47
You will not see any Windows folders from Ubuntu. I have edited the answer. Please check if that solves Your problem :) – Misery Feb 10 '12 at 16:02
Perfect answer! It solved my problem. Thank you :) – sedran Oct 11 '14 at 9:38

The solution is to:

  1. Install Guest additions on guest system (Windows)
  2. Do not install Guest additions on host system (Ubuntu)
  3. Add user to vboxsf group:

    sudo usermod -g vboxsf username

    Note: -g will set the primary group of the user to vboxsf (REPLACING whatever default group she belongs to, and changing all files created with it to vboxsf). "-G" will delete all auxiliary groups of the user (including "admin"!) and replace with vboxsf. The safest bet is to use "-a -G vboxsf username", which appends the vboxsf group to current auxiliary groups for that user, changing nothing else.

  4. Create the dir for the shared docs:

    mkdir /home/username/shared

    (the mistake was to try to put this in /media and trying mounting it - this is not necessary as the newest VirtualBox does it for us)

  5. Go to the VirtualBox options and add the directory /home/username/shared to the shared paths.

    In my case the button was grayed probably due the permissions, now solved in 3.

And that's all. The specified dir will appear in the Windows as a new drive.

share|improve this answer

Create a directory on Windows, say ubuntu.

In the device of VMware share this directory (ubuntu).

Create a directory on Ubuntu in root (/) say /windows.

mount.vboxsf -w ubuntu /windows
share|improve this answer
No problem in answer but try to format it a little better. People are likely to take more notice because of it. – VedVals Nov 30 '12 at 18:55

The answer to your question is here

You must add the mount line in the /etc/profile file to make the mount permanent whenever you log in.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.