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?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
There are 2 ways, which I normally use
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.
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
Thank you for Alvin Sim's answer. Though it is clear, I still spend some time to do everything correct. OK, here are my detailed steps using Alvin Sim's Option 1.
In Guest terminal, type
sudo mount -t vboxsf HOST_SHARE GUEST_SHARE`
If you see the error
mount: wrong fs type, bad option, bad superblock on …, this means you first need to install
sudo apt-get install virtualbox-guest-utils
Then run the
mount command again
You shall find your stuffs in this
sudo mount -t vboxsf SHARENAME /media/vboxshared
c:\SharedBothat virtualbox menu "settings" - "shared folders" - "add" -"permanent/automount", before you start the ubuntu virtual machine.
sudo mount -t vboxsf SharedBoth /media
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:
Cleanly unmount the USB from windows by clicking on the corresponding icon in the bottom right corner and selecting the "safely remove ..." option.
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
Shared folder as stated in laebshade's and Alvin Sim's answers. But that can be slow.
FTP etc... as also stated in Alvin Sim"s answer (assumes you have an ftp server on your Windows host).
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
For small volumes and frequent synchronisation, open a dropbox account.
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.
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?