VirtualBox + Linux + SharedFolder


Install VB utils (Ubuntu):

sudo apt-get install virtualbox-guest-utils

Manually mount shared folder:

mount.vboxsf -w -o umask=0007,uid=1000,gid=1000 shared_name /<target>
  • umask: set persmissions (0007 -> full perm to owner and group, no perm to other)
  • uid/gid: user and group id
  • shared_name: the name given in VB dialog for the shared folder
  • /<target>: the folder inside Linux
mount.vboxsf -w -o gid=1000 git_repository_other /media/sf_git_repository_other


Additional drives in Ubuntu

If you need to add an additional drive to your ubuntu in VB, than create this drive with the VB gui and connect them to your ubuntu. After that you need to start ubuntu and do some additional steps.

List all drives:

First you need to find out the name of the new connected drive.

sudo fdisk -l

Partition and format drive (Ubuntu):

After you got the correct name of your new drive, you need to create a partition and format this. In our case we will format this to ext4.

# Start KDE on Mint
xinit /usr/bin/startkde
# Use the gnome disks tool
use gnome.disks
Console (

To create a linux partition do the following steps:

sudo -s
fdisk /dev/sdX
# Choose command: "n" to create new partition, the other values on your needs 
# Choose command: "t" to change the partition type (<strong>different</strong> from linux)
# Choose command: "p" to check your changes
# Choose command: "w" after the above step, to write the above changes permanent

Format the new partition:

mkfs.ext4 /dev/sdXY

Mount local drives:

Mount in to you home directory (~/mountpoint) to prevent permission problems.

Mount temporary:
mount /dev/sdb1 /mount/point
Mount permanently (

Click here to see wiki of fstab.

# Get UUID
sudo blkid

# Edit fstab (gedit/kate)
sudo gedit /etc/fstab

# Add new line like this
UUID=03ec5dd3-45c0-4f95-a363-61ff321a09ff /mount/point ext4 defaults  0      2


Install VirtualBox Guest Additions in Ubuntu

To access to the shared folder you have to be a member of the following group: vboxsf