How To Install Virtualbox Guest Additions on Elementary OS
In this tutorial, I’m going to show you how to install Virtualbox guest Additions on Elementary OS virtual machine. What the guest additions offer are the ability to share directories, files and clipboard between your host machine and guest machine. It can also power up the graphics ability of your guest machine so the guest machine can enter full-screen mode. Once you installed the guest additions, you will have more option in the resolution selection.
Install Virtualbox Guest Additions on Elementary OS Virtual Machine
Log into Elementary OS (guest OS) and update your software packages.
sudo apt-get update;sudo apt-get upgrade;sudo apt-get dist-upgrade
Install required packages for building kernel modules.
sudo apt-get install build-essential module-assistant
Prepare your system for building kernel module
sudo m-a prepare
In the virtual machine window, select Devices > Insert Guest Additions CD image.
It will ask you to download the guest additions iso image. Click Download.
The VBoxGuestAdditions_<version_number>.iso file will be downloaded into /home/<username>/.config/Virtualbox directory
Once the download is complete, it will ask you to insert the iso image into the virtual CD/DVD drive. Click Insert.
Now open a terminal in Elementary OS, and issue the following command:
blkid
Output:
/dev/sr0: LABEL="VBOXADDITIONS_4.3.36_105129" TYPE="iso9660"
/dev/sr0 is the name of the virtual CD/DVD drive.
FYI, /dev/sr0 is a device on the SCSI controller, whereas /dev/hda is a device on the IDE controller, /dev/cdrom is a symlink to either /dev/sr0 or /dev/hda (the first CD/DVD device).
make a cdrom directory under /media and mount the virtualbox guest additions iso image.
sudo mkdir /media/cdrom sudo mount /dev/sr0 /media/cdrom
Now change your working directory to /media/cdrom and run the vbox additions installer.
cd /media/cdrom sudo sh VBoxLinuxAdditions.run
output
Verifying archive integrity... All good. Uncompressing VirtualBox 4.3.36 Guest Additions for Linux............ VirtualBox Guest Additions installer Copying additional installer modules ... Installing additional modules ... Removing existing VirtualBox DKMS kernel modules ...done. Removing existing VirtualBox non-DKMS kernel modules ...done. Building the VirtualBox Guest Additions kernel modules ...done. Doing non-kernel setup of the Guest Additions ...done. You should restart your guest to make sure the new modules are actually used Installing the Window System drivers Installing X.Org Server 1.16 modules ...done. Setting up the Window System to use the Guest Additions ...done. You may need to restart the the Window System (or just restart the guest system) to enable the Guest Additions. Installing graphics libraries and desktop services components ...done.
Reboot your guest OS.
sudo reboot
Now the resolution of Elementary OS will adjust with the size of virtulbox window. So you don’t need to manually adjust the resolution. You can also press right Ctrl and F keyboard shortcut to enter full-screen mode.
Wrapping Up
I hope this tutorial helped you install VirtualBox guest additions in Elementary OS. You may also want to read:
- Virtualbox Bridged Networking Mode Allows VM to Connect to Your Router
- How to Access USB from VirtualBox Guest OS
As always, if you found this post useful, then subscribe to our free newsletter to get more tips and tricks. Take care 🙂
sems my install stops at the
Installing additional modules …
vboxadd.sh: Starting the VirtuabBox Guest Additions.
Ay idea why ? or how to get it done ?
PS: I’m a bit new to the Linux world but I need a box for Haskell and yesod stuff (that I still dont really understand fully)
Tank you very much for the nice instruction. Great Work!
This guide has been so very helpful. Thank you for taking the time to write it up! <3
Very helpful. Worked for me.
I know that there is also another way to install the Guest Additions using the VirtualBox-dkms package. Which is the difference between the two type of Guest Additions ?
thanks
Stefano
Thanks this works great!
Thanks for this great work.
You are very thorough. Mahalo for being such a bada$$.
BTW, your data was the only one that worked for me. Everyone else was complete overkill.
I’m new to virtualbox and I just wanted what you wrote.
While my VM didn’t quite follow your procedure to the letter (I’m using Vbox on a Mac mini), it still worked out just fine. Had a bit of an issue with getting “Full Screen” to work at first, but I think it finally fixed itself.
Thanks for the info!