VirtualBox Guest Additions Installer

Script to install VirtualBox in an Ubuntu based system, and configure user privileges.

Optional: Download the VirtualBox Extension Pack from: VirtualBox Downloads
Open the Extension Pack via your file manager in order to install it with VirtualBox.


#Title :
#Description :  This script will add the Oracle Repository for VirtualBox,
#                install the application, and then add the current user to vboxusers group
#Author :       QuidsUp
#Date :         2019-06-23
#Version :      0.4
#Usage :        bash
#Version History:
#0.1  2014-10-14  Created
#0.2  2015-03-27  Added header information
#0.3  2015-03-28  Swapped su for tee command
#0.4  2019-06-23  Added additional key and forced 64 bit architecture

echo  "[arch=amd64] deb $(lsb_release -cs) contrib non-free #Virtualbox" | sudo tee /etc/apt/sources.list.d/virtualbox.list
wget -q -O- | sudo apt-key add -
wget -q -O- | sudo apt-key add -

sudo apt-get update
sudo apt-get install virtualbox-6.2
if [ "`grep vboxusers /etc/group|grep $USER`" == "" ] ; then sudo usermod -G vboxusers -a $USER ; fi