Copying files between Linux VirtualBox guest and host

In VirtualBox go to “Network Adapters…” from the Devices menu and set Attached to: Host-only Adapter.

Set up IP addresses in the same sub domain. On the host:
ifconfig vboxnet0 192.168.56.1 netmask 255.255.255.0
On the guest:
ifconfig eth0 192.168.56.2 netmask 255.255.255.0
route add default gw 192.168.56.1

Use secure copy to transfer files from host to guest. From the host:
scp filetocpy guestuser@192.168.56.2:/guestdir/

Advertisements

3 thoughts on “Copying files between Linux VirtualBox guest and host

  1. Another option is to power the guest machine/OS on;
    then click on devices, select drag n drop; then select bidirectional.
    Next just open a folder in the guest OS and copy a file or folder from the host OS;and it’s done.
    Hope this helps.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s