Ubuntu: How can I tell if the VirtualBox guest additions were installed on an Ubuntu VM?



Question:

How can I tell if the guest additions are installed on a VirtualBox VM with no X Windows installed?
I'm having a problem mounting a shared directory and I'd like to rule out the possibility that the guest additions weren't installed.


Solution:1

Use lsmod from the command line, as it will tell you not only if it's installed, but properly loaded:

$ lsmod | grep vboxguest  vboxguest             219348  6 vboxsf  


Solution:2

You can check if the modules are present.

Try:

sudo modprobe vboxadd  

or

sudo modprobe vboxvfs  

This will load the guest additions if they're installed (but usually they would be loaded automatically at boot time anyway).

You'll get an error if the module isn't present. That indicates that the VirtualBox guest additions are not installed properly.

Or you can search for the script that loads the modules:

grep vboxadd /etc/init*/*  

and see if you get any output.


Solution:3

If the extensions were installed using the Ubuntu package repositories (via apt or Synaptic) you can check to see if the packages are currently installed:

dpkg -l | grep virtualbox-guest will list the guest packages that are currently installed.
virtualbox-guest-dkms is the kernel module, and virualbox-guest-utils are the command-line utilities. There may be other packages available (apt-cache search virtualbox-guest will list them).

Feiticeir0's answer will also detect the kernel module (if it was installed manually).
If the guest extensions are not installed you can install them the same way you would any other Ubuntu package.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »