How to install the VirtualBox Guest Additions on Kali Linux

If you use VirtualBox, you know how annoying it is when you cannot drag-and-drop files or copy-and-paste text from your host to your VM and vice versa. To do that, we need to install what VirtualBox calls the Guest Additions.

 So, here are the steps to install the VirtualBox Guest Additions in Kali.

First, we need the Linux headers, the command to do that is:

apt-get install linux-headers-$(uname -r)

With linux headers installed, we can insert the Guest Additions CD using the “Devices” menu and copy all the files from the CD to the Download folder.

 Then, open a terminal and type the following commands.
cd ~/Downloads/
chmod +x VBoxLinuxAdditions.run
./VboxLinuxAdditions.run

After the script has finished, restart the system and then make sure to set the “Shared Clipboard” and “Drag‘n’Drop” values in the “Advanced” tab of the Kali VM’s General Settings to the appropriate value (e.g. Bidirectional).

As always, if you have any questions, feel free to tweet me at @GianniGnesa or send me a direct message on LinkedIn.