Page 1 of 1

How to copy folders from Linux to Linux?

Posted: 10. Dec 2020, 20:20
by vmelkon
What I want to do:
Copy a folder from host OS to guest OS.

What information can I give?
1. This is a recent install of VirtualBox. Version 6.1.16 r140961 (Qt5.9.5)
2. My host OS is Kubuntu 18.04.
3. As a guest OS, I have installed
Kubuntu 18.04 and
OpenSUSE Tumbleweed
4. I have installed VboxLinuxAdditions.run I both guest OSs.
5. Clipboard sharing works fine.

How can I copy file and folders from the host OS to guest OS?

In the menu, there is Machine → File Manager
A window opens and I have to start a session by entering my username + pwd.
PERFECT! Now I can transfer files 1 by 1.
How can I transfer a folder?

Re: How to copy folders from Linux to Linux?

Posted: 11. Dec 2020, 10:59
by mpack
How would you copy a folder if it was two physical PCs?

Re: How to copy folders from Linux to Linux?

Posted: 11. Dec 2020, 19:04
by vmelkon
I don’t know. I have never done it with Linux. I have only done it with Windows.

Re: How to copy folders from Linux to Linux?

Posted: 13. Dec 2020, 00:30
by scottgus1
vmelkon wrote:I don’t know.
There are two ways to do this. One is through a network between the host and the VM, and a shared folder on the host OS. This is the answer to Mpack's "How would you copy a folder if it was two physical PCs?" You would use Virtualbox's Bridged or Host-Only, see Virtualbox Networks: In Pictures. Either will give you an Ethernet network between the physical PC's OS and the VM. Then web-search how to share and access folders across a network in Linux. (Explaining that part is beyond the scope of this forum.)

Or you can 'cheat' by using Virtualbox Shared Folders, provided through Guest Additions, which it appears you installed in the VM. See the VM's Shared Folders settings in the main Virtualbox window, and section 4.3 in the Virtualbox manual. No network is needed, but all you can safely do is mouse-drag-copy files & folders, not run databases or edit the files from the VM while they're still in the Virtualbox Shared Folder on the host. You have to copy them to the VM's disk first. If you want to edit from the VM while the file is still on the host, you need a full network and real shared folder as detailed above.