How to install Virtualbox Guest Additions for a Linux Guest?
“We all love Virtualbox”. Installing Guest Additions on Virtualbox enables you to use some very powerful features such as seamless integration and full screen resolution mode. You can read more about these features in an article which we have already authored. In this article we will show you how to install virtualbox guest additions in 5 easy steps: (Remember All this steps are supposed to be performed inside the guest OS, not on the Host)
1. Mount Virtualbox ISO Image by clicking on Devices > Install Guest Additions… in the Virtualbox Guest window that is currently running your Linux OS (Guest).
2. Now copy the Guest Additions Installer from the mount folder (Where the VBOXGUESTADDITIONS iso image got mounted), to your home folder. It is a file named VBoxLinuxAdditions.run. If you are using a 32 bit system, then you must rename this file to VBoxLinuxAdditions-x86.run
3. Change the filetype of VBoxLinuxAdditions-x86.run and make it executable by running the following command:
4. Now install dkms and the GNU C Compiler using the following command:
Debian and Ubuntu Users may use this command:
5. Now you have to install Build and Kernel Header files for your system. The installation depends on the type of Linux Guest you are using. For Installing the Build and Kernel Headers on a RedHat or it's derivatives like Fedora or CentOS, you must see this. And for Installing the Build and Kernel Headers on a Debian or it's derivatives like Ubuntu, you must see this.
6. Finally, Install Guest Additions by using the following command:
In case you get an error such as "No support for OpenGL direct rendering" then you should check this tip.
You should now reboot your virtual machine, after which you will notice that the VM has been automatically switched to Seamless Mode and the resolution has been changed (rather upgraded) to 1024x768. You should see our article on how to enable higher screen resolutions in a Virtualbox Linux Guest OS. Should you have any problems, let us know about it in the comments.