Guest: Ubuntu
Host: Ubuntu
1. Install Guest Additions
From the Devices toolbar, click shared folder settings. Once the guest addition is downloaded, insert the disc using Devices > Insert Guest Addition CD
2. Mount Guest Addition CD and Install
sudo mount /dev/cdrom /media/cdrom cd /media/cdrom sudo VBoxLinuxAdditions.run
3. Restart
4. Create Shared Folder and Mount It
Text below is shamelessly copied from Ubuntu’s official site:
Creating a shared folder
-
Create a folder on the Host computer (ubuntu) that you would like to share, for example ~/share
-
Boot the Guest operating system in VirtualBox.
-
Select Devices -> Shared Folders…
- Choose the ‘Add’ button.
-
Select ~/share
- Optionally select the ‘Make permanent’ option
Prepare the folder
After you run following command, the shared folder will be accessible at ~/host location.
sudo mount -t vboxsf -o uid=$UID,gid=$(id -g) share ~/host