Installing VirtualBox Guest Addition and& mount shared folder

Fri, Nov 30, 2012 1-minute read

Step by step guide how to install VirtualBox guest addition and mount shared folder (Ubuntu 12.04)

  1. Start the Ubuntu Server VM and insert the Guest Additions CD image (Devices menu, Install Guest Additions).
  2. Install necessary build tools and build dependencies:
   $ sudo apt-get install -y dkms build-essential linux-headers-generic linux-headers-$(uname -r)
  1. Mount guest addition
    $ cd /opt
    $ mkdir cdrom
    $ mount /dev/cdrom /opt/cdrom
    $ cd cdrom
    $ ./
  1. reboot
    $ reboot
  1. add next to /etc/rc.local file
    $ sudo su -  
    $ cd /mnt  
    $ mkdir vbox-shared  
    $ cd /etc  
    $ vim rc.local  
        mount -t vboxsf -o uid=1000,gid=1000 vbox-shared /mnt/vbox-shared  
  1. now shared folder is inside /mnt/vbox-shared

If you receive error:

mount: unknown filesystem type ‘vboxsf’

In that case just replace ‘vboxsf’ with ‘vboxfs’