Creating a Linux VirtualBox share

In: development

9 Jan 2013

I use a GUI-less Linux VirtualBox VM for development. I needed an easy way to transfer files back and forth. Seeing as this is the third time I needed to set this up, I figured I should document the steps.

  1. Install VirtualBox Guest Additions on the Linux VM
    • On the host VM, click “Devices”->”Install Guest Additions”
    • cd /media/cdrom
    • sudo mount /dev/cdrom /media/cdrom
    • sudo ./VBoxLinuxAdditions.run
  2. Create the shared folder
    • Open the host VM settings
    • Click “Shared Folders”
    • Click the icon with the plus sign to add a share
    • Select the path on your host system that you want to designate as the commonly shared directory
    • Check “Auto-mount” and “Make Permanent”
    • Click “OK” to save the share
  3. Add your user to the group so you can access the share
    • useradd -a -G vboxsf [username]
    • Reboot

After you do these steps, your share will be available on your host operating system and your Linux guest operating system (and will be there on reboot). You can find the share on your Linux system at /media/sf_shared .

Comment Form

About this blog

I'm Jon Chin. I love technology, food, and learning. I served a mission in the Philippines and loved it. You probably can't type on my keyboard because I don't have qwerty installed--I use Colemak. I'm obsessed with learning about North Korea and abandoned anything.

Photostream