Install VirtualBox Guest Additions on Kali Linux 2020.3

|
Last Updated:
|
|

In order to set your Kali Linux running on VirtualBox in fullscreen mode, you need Guest additions installed on the VM. In this tutorial, you will learn how to install VirtualBox guest additions on Kali Linux 2020.3. Apart from enabling the virtual machine to have a full screen view, guest additions offers many other features;

  • Mouse pointer integration
  • Shared folders for easy sharing of files between the host and the guest
  • Ensures better and accelerated video performance.
  • Seamless windows integration
  • Generic host/guest communication channels that enables you to control and manage guest execution.
  • Provides Host-Guest time synchronization.
  • Shared clipboard between host and guest vm.
  • Automated logins.

You can read more about these features on the VirtualBox User Manual.

Install VirtualBox Guest Additions on Kali Linux

There are two ways in which you can install VirtualBox guest additions.

  1. Via X11 guest utilities for package for VirtualBox
  2. Via VirtualBox Guest Additions Image

Install via x11 Guest Utilities package

X11 Guest Utilities package for VirtualBox are provided by the virtualbox-guest-x11 package. To install this package, you need to have the Kali Linux repositories installed.

Check if you Kali Linux repos installed;

grep -v '#' /etc/apt/sources.list | sort -u
deb http://http.kali.org/kali kali-rolling main non-free contrib
deb-src http://http.kali.org/kali kali-rolling main non-free contrib

If the command output is empty, run the command below to install Kali Linux rolling release repositories.

cat > /etc/apt/sources.list << 'EOL'
deb http://http.kali.org/kali kali-rolling main non-free contrib
deb-src http://http.kali.org/kali kali-rolling main non-free contrib
EOL

Run system package cache update once the repos are installed.

apt update

Install VirtualBox x11 guest utilities.

apt install virtualbox-guest-x11

Once the installation is done, reboot the system and your Kali Linux 2020.3 is now running in fullscreen on VirtualBox.

If the screen doesn’t resize itself to fullscreen on reboot, you can toggle the screen auto-resize by navigating to VirtualBox VM menu View > Auto-resize Guest display.

kali linux virtualbox guest additions

Install via Guest Additions Image

If you want to take this long route, then you first need to insert the guest additions iso/image file into your Kali Linux 2020.3 virtual machine.

Insert the Guest Additions Image into the Kali Linux 2020.3 virtual machine

Guest additions image can be inserted into a VirtualBox virtual machine manually via the VM menu or by installing the virtualbox-guest-additions-iso package.

Insert Guest Additions Image manually

Guest additions image can be manually inserted into a vm via the VM virtualbox menu. Before the image can be inserted into the vm, you need to install required build tools, the Linux kernel headers and the support modules, if not already installed.

To verify if these build requirements have already been installed, run the command below;

sudo dpkg -l | grep -E "dkms|linux-headers-$(uname -r)|build-essential"
ii build-essential 12.8 amd64 Informational list of build-essential packages

As you can see, we only have the build-essential tools installed. The ii means that the package is installed. Install the missing packages;

cat > /etc/apt/sources.list << 'EOL'
deb http://http.kali.org/kali kali-rolling main non-free contrib
deb-src http://http.kali.org/kali kali-rolling main non-free contrib
EOL
sudo apt update -y
sudo apt install dkms linux-headers-$(uname -r) build-essential

Once the installation is done, insert the Guest Additions ISO into the vm from the menu bar > Devices > Insert Guest Additions CD Image...

Ensure that you have unallocated (empty) controller IDE from virtual machine storage settings to insert the image.

Once you insert the image, a dialog box which prompts you to run or cancel the Guest Additions installer is launched. You can click run or simply cancel and do the installation of VirtualBox guest additions on Kali Linux 2020.3 from the command line;

If no dialog is launch upon Guest addition image insertion, simply double click the image icon the desktop to mount it.

Insert Guest additions Image by installing it

You can as well install the VirtualBox Guest additions iso/image file from Kali Linux repositories;

sudo apt install virtualbox-guest-additions-iso

When installed, the VirtualBox Guest Additions ISO is now available as /usr/share/virtualbox/VBoxGuestAdditions.iso.

To install the Guest Additions ISO, you need to mount it.

sudo mount -o loop /usr/share/virtualbox/VBoxGuestAdditions.iso /media/cdrom

If you used the manual method of inserting the guest additions iso, the image can be mounted on either, /media/{cdrom,cdrom0,cdrom1}. You can find the mount point using df -h command.

Next, run the Guest additions installer for Linux on Kali Linux 2020.3 VirtualBox vm. Replace the path to the Guest additions installer appropriately.

bash /media/cdrom/VBoxLinuxAdditions.run

Once the installation is done, restart the system to reload the kernel modules and apply the changes.

Kali Linux 2020.3 FullScreen on VirtualBox

Your Kali Linux 2020.3 should now be running in fullscreen. If upon system reboot the screen doesn’t auto-resize automatically, be sure to toggle (off/on, so to say)  View -> Auto-resize Guest Display on the VM menu bar to set right VM resolution.

Install VirtualBox Guest Additions on Kali Linux 2020.3

That is how easy it is install VirtualBox Guest Additions on Kali Linux and run it on full-screen. Enjoy

Related Tutorials

Install Kali Linux 2020.3 on VirtualBox

Install VirtualBox Guest Additions on Fedora 31/32

Upgrade VirtualBox 6.0 to 6.1 on Ubuntu Systems

Install VirtualBox Guest Additions on Ubuntu 20.04

Use VirtualBox VMs on KVM

SUPPORT US VIA A VIRTUAL CUP OF COFFEE

We're passionate about sharing our knowledge and experiences with you through our blog. If you appreciate our efforts, consider buying us a virtual coffee. Your support keeps us motivated and enables us to continually improve, ensuring that we can provide you with the best content possible. Thank you for being a coffee-fueled champion of our work!

Photo of author
koromicha
I am the Co-founder of Kifarunix.com, Linux and the whole FOSS enthusiast, Linux System Admin and a Blue Teamer who loves to share technological tips and hacks with others as a way of sharing knowledge as: "In vain have you acquired knowledge if you have not imparted it to others".

3 thoughts on “Install VirtualBox Guest Additions on Kali Linux 2020.3”

  1. Champion! Easy to follow and worked first run at your instructions. Ha, usually things are more challenging. You helped my day smooth out, my friend.

    Thank you 🙂

    Reply

Leave a Comment