Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

How should I transfer files from Windows to Ubuntu installed on Virtualbox? When I plugged in a USB, it only pops up in Windows.

How can I see it in Ubuntu?

share|improve this question
add comment

4 Answers

up vote 6 down vote accepted

There are 2 ways, which I normally use

Option 1: Before booting up Ubuntu, inside Virtualbox Ubuntu VM settings, specify a share folder. Then after logged in to Ubuntu, create a new directory for example /media/vboxshared and mount that drive using the command sudo mount -t vboxsf SHARENAME /media/vboxshared. Enter your password when it prompts for the password.

Option 2: Before booting up Ubuntu, add a new Network adapter and select 'Bridged Adapter'. Then after logged in to Ubuntu, run the command ifconfig -a | more to get the ip address of that new network adapter. In Windows, use WinSCP or FileZilla to transfer the file to Ubuntu

share|improve this answer
add comment

Which is the host, and which is the guest? Either way, Virtualbox has a sharing mechanism you can use; just install the Guest Additions as described in the documentation then setup a share in the VirtualBox configuration.

share|improve this answer
    
I went through that but when I tried to mount that I got an 'only root can do that' error. –  GTyler Jul 7 '11 at 1:20
    
@laebshade: The OP already stated which way around this was in his question. Windows is the host, Ubuntu is the guest. –  Caleb Jul 7 '11 at 12:07
add comment

In any case, you can easily make the USB key visible in the guest. From your question I imagine you run Ubuntu in a guest and the host is Windows.

Whenever you insert an USB key, if you want to see it in the guest proceed as follows:

  1. Cleanly unmount the USB from windows by clicking on the corresponding icon in the bottom right corner and selecting the "safely remove ..." option.

  2. In your VirtualBox window select the "Devices => usb devices" menu item on the top left guest window menu and select your USB key. It should appear in Ubuntu now.

This operation is equivalent to physically inserting your USB key in a USB port of your guest machine.

Otherwise, the other options are

  1. Shared folder as stated in laebshade's and Alvin Sim's answers. But that can be slow.

  2. FTP etc... as also stated in Alvin Sim"s answer (assumes you have an ftp server on your Windows host).

  3. A simple samba mount from the guest:

    mount -t cifs //winhost/share /home/yourname/mntpoint -o user=winusr%paswd,uid=0,gid=0,file_mode=0777,dir_mode=0777
  4. For small volumes and frequent synchronisation, open a dropbox account.

share|improve this answer
add comment
  1. In virtual box, login to Ubuntu.
  2. In menu bar click devices -> USB devices -> Select your device (Pendrive).
  3. Then go to the Home folder. On the left you'll see your device.
share|improve this answer
add comment

Your Answer

 
discard

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.