I have an Ubuntu 12.04 machine on which I have installed VirtualBox with Ubuntu 12.04 as the guest OS.

How can I share files between the host and guest?

I have installed the guest additions also but still it’s not able to mount the sf_shared folders if even it’s mounted. This means I'm unable to retrieve the file from the host.

  • also see: askubuntu.com/questions/30396/… - but I recommend to use Ubuntu's inbuilt file sharing through the virtual network.
    – Takkat
    Oct 27, 2013 at 19:22
  • @EricCarvalho It does seem like one of these should be made a duplicate of the other. The titles can be edited if necessary, since there aren't that many differences between Ubuntu and other hosts for this. Either way, answers of the closed questions can be merged into the other, especially if there's concern about them being obscured or (less likely) someday deleted. This one has far more views, but for most people I suspect the answer on the other one might be the most valuable. Sep 5, 2017 at 23:44

5 Answers 5


I do not believe its possible to share files between the host and the guest without installing the extension pack first though I could be wrong on this.

You can find that here: https://www.virtualbox.org/wiki/Downloads

Check that the version of Virtualbox you have. Mine is 4.2.18 and double click the link

You should see something like this

enter image description here

Click OK and let it install.

Next step create a folder on your host machine as as share area

I've created one called VboxShare in my home directory.

enter image description here

First, make sure that your virtual machine is powered off.


Then, go into settings for your virtual machine, select shared folders then the plus icon to create a shared folder and fill in the details set it to auto mount.

enter image description here

Click OK then start your guest.

Job Done the shared folder appears on you guest machine as


enter image description here

There is only one more step add any user in your guest system that needs access to the folder to the group vboxsf:

sudo adduser $USER vboxsf

Log out and back in, everything should work fine now.

  • @Richard: can you explain your comment? Are you saying sudo adduser $USER vboxsf doesn't work or that sudo useradd -g $USER vboxsf is somehow preferable?
    – User
    Dec 1, 2014 at 5:53
  • This last command to adduser, is that done on the host machine or on the guest machine? Looks like it should be done on the guest machine because $USER means someone else on the host machine, but just checking. All my commands succeed but I still don't see anything in the shared folder on the guest machine.
    – Reb.Cabin
    Jun 23, 2015 at 12:27
  • @Reb.Cabin it says in the answer this is on the guest machine you also need to log out and back in again on the guest machine. Jun 23, 2015 at 15:16
  • @WarrenHill that did it, tyvm.
    – Reb.Cabin
    Jun 23, 2015 at 15:20

On the VM settings in the Shared folders section, remember the name of your shared forlder!
After installing the VBox Guest additions on the guest OS fire up a terminal and type in

sudo mount -t vboxsf <share-name> /where/to/share

may wanna check https://forums.virtualbox.org/viewtopic.php?f=3&t=15868


Go to Devices option of your VM and click on the Shared Folders option and add the required_folder you want to share. Now in your file system (root) you can see media/sf_required_folder. But by default the Guest User won't have access to this folder. So to grant access to this folder you need to add Guest user to the group vboxsf. For this, sudo adduser Guest_user vboxsf to give access. Now have the access.


If you want to share files and folders you can use Vbox extensions as mentioned in other posts.

Alternatively you can use Nitroshare :

  1. Install Nitroshare (in host and in guest )

    sudo add-apt-repository ppa:george-edison55/nitroshare
    sudo apt-get update
    sudo apt-get install nitroshare

    There are four ways to install Nitroshare - reference : here

  2. Start Nitroshare (in guest and host) from the dash or from a terminal command nitroshare

    You will see the tray icon on top right corner :


  3. By default the destination folder is ~/Desktop. You can modify it in settings.


  4. Sending files and folders:

    Select _send files/Directory _ from the tray icon, select the file /directory you want to share, click on open.

    Then select the VM device from the menu and click OK.



Try this combo. I used this as I am using AMD64 CPU.

virtualbox-4.3_4.3.6-91406~Ubuntu~precise_amd64 with extenstion pack -

It works. Also Make sure

After installing the VBox Guest additions on the guest OS (VM) fire up a terminal on Guest server and type in

mount -t vboxsf  /shared-name /where/to/share


sudo mount -t vboxsf /home/myshare /mnt

where /home/myshare is a folder on Host Server and /mnt is a folder on guest server.

Start dumping files on host folder /home/myshare and see the same on guest /mnt

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