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/

Advertisement

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 )

Connecting to %s


Follow

Get every new post delivered to your Inbox.