Skip to content

Instantly share code, notes, and snippets.

@djwglpuppy
Created July 19, 2012 16:43
Show Gist options
  • Save djwglpuppy/3145195 to your computer and use it in GitHub Desktop.
Save djwglpuppy/3145195 to your computer and use it in GitHub Desktop.
Setting up Shared Folders for Virtual Box in Ubuntu 12.04

#Setting up Ubuntu 12.04 for File Sharing

SSH into the Ubuntu Virtual Machine and run these commands

ubuntu> sudo apt-get install build-essential module-assistant
ubuntu> sudo m-a prepare

From the VirtualBox menu in OSX Devices > Install Guest Additions…

Go back into VirtualBox and run these commands

ubuntu> cd media/
ubuntu> sudo mkdir vbox/
ubuntu> sudo mount /dev/sr0 vbox/
ubuntu> cd vbox/
ubuntu> sudo ./VBoxLinuxAdditions.run
ubuntu> sudo reboot

Once it is rebooted and you are logged in, you need to give yourself rights to access the folders

ubuntu> sudo adduser <username> vboxsf

You can now add folders to your VirtualBox.

In the lower corner of the VirtualBox Window, click the Shared Folders… icon and select the folder you want to share. After it is shared you can access it

ubuntu> cd /media/
ubuntu> ll 
#ANY FOLDER BEGINNING WITH sf_ is a folder you shared
@KyleCartmell
Copy link

Thank You!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment