How to Install VirtualBox Guest Additions on Debian

VirtualBox Guest Additions are a set of drivers and utilities that enhance the performance and usability of the guest operating systems running inside a VirtualBox. These additions provide features such as better display resolution, mouse integration, and improved file sharing between the host and guest systems.

This article will guide you through the complete process of VirtualBox guest additions installation on Debian.

Prerequisite to Install VirtualBox Guest Additions on Debian

  1. Installation of VirtualBox.
  2. Installed Debian on VirtualBox.

Installing VirtualBox Guest Additions on Debian 12

To install VirtualBox Guest additions on Debian, follow the steps below:

Step1: Update the System

Ensure that your Debian system is up to date by running the following commands in the terminal respectively:

sudo apt update

sudo apt upgrade

Update and upgrade the Debian VM.

Step 2: Install Required Packages

To install the necessary packages for the Guest Additions, run the following command:

sudo apt install -y build-essential dkms linux-headers-$(uname -r)

Installs the necessary packages.

Step 3: Add the Guest Additions CD Image

In the VirtualBox menu, navigate to Devices > Insert Guest Additions CD image to add the Guest Addition CD image to your Debian virtual machine.

Step 4: Create a Directory for CD Image

Create a new directory to mount the inserted CD image using sudo mkdir -p /mnt/cdrom command. Now mount the inserted CD image to “/mnt/cdrom” directory using the following command:

sudo mount /dev/cdrom /mnt/cdrom

Insert the Guest Additions CD ISO file

Step 4: Navigate to the Mounted CD

To navigate the directory where the CD is mounted, open the terminal and run the command:

cd /mnt/cdrom

Step 5: Run the Guest Additions Installer

Now, run the VirtualBox Guest Additions installer using the following command:

sudo ./VBoxLinuxAdditions.run

Run the Guest Additions script.

Step 6: Restart the virtual Machine

After the installation is complete, restart your Debian virtual machine using sudo reboot command or sudo shutdown -r now command.

Step 7: Verify the Installation

To verify that the installation was successful, run the following command:

lsmod | grep vboxguest

Verify the installation.This output confirms that the installation was successful. If no output is returned, it indicates that the VirtualBox kernel module is not loaded successfully.

Conclusion

To sum up, the installation of VirtualBox Guest Additions on Debian significantly improves the functionality and integration of your virtual machine. By following the outlined steps, you can successfully optimize display settings, and achieve seamless mouse integration with file-sharing capabilities. With VirtualBox Guest Additions, your Debian virtual machine is now equipped with the tools necessary for an enhanced computing environment.

People Also Ask

How to install VirtualBox on Debian?

To install VirtualBox on Debian, you can follow the steps below:

  1. Open the terminal on Debian and update the package repository using sudo apt update command.
  2. Then, using sudo apt install -y gcc make perl command, install the necessary packages on which VirtualBox depends.
  3. Now, add a virtual box repository using the following command:
    sudo sh -c 'echo "deb [arch=amd64] http://download.virtualbox.org/virtualbox/debian $(lsb_release -sc) contrib" > /etc/apt/sources.list.d/virtualbox.list'
  4. Use sudo apt update command to update the package list and install VirtualBox using the following command:sudo apt install -y virtualbox-6.0
  5. Then, add user to “vboxusers” group using sudo usermod -aG vboxusers $USER.
  6. Finally, to launch VirtualBox, open VirtualBox from the application menu or run virtualbox.

What are the features of VirtualBox Guest Addition?

The key features of VirtualBox Guest Additions are:

  1. Resizable Display: Allows dynamic resizing of the guest display window.
  2. Seamless Mouse Integration: Enables smooth mouse navigation between the host and guest systems.
  3. Shared Folders: Enables easy files and folder sharing between the host and the guest systems.
  4. Clipboard Sharing: Facilitates the copying and pasting of text and files seamlessly between the host and guest systems.
  5. Time Synchronization: Keeps the guest system time synchronized with the host system time.

How to install the Debian Guest operating system in Virtualbox?

To install the Debian Guest operating system in VirtualBox, follow the steps below:

  1. First, download the Debian ISO file from the official Debian website.
  2. Create a new virtual machine by clicking “New”. Then set the name, type(Linux), and versio(Debian)n for the VM.
  3. Allocate memory by assigning an appropriate amount of RAM for the Debian VM.
  4. Create a new virtual hard disk.
  5. In VM settings, under “Storage,” choose the Debian ISO as the optical disk.
  6. Click “Start” to boot the VM and initiate the Debian installation.
  7. Follow the “Installation Wizard” to install Debian, select language, and location, and configure user accounts.
  8. Choose “Guided or Manual partitioning as your preference.
  9. Then Install “GRUB” to master the boot record.
  10. Allow the installer to complete, remove the ISO, and restart the VM.
  11. Finally, log in to Debian and update the system using sudo apt update command. Lastly, run sudo reboot to restart the Debian VM.

What is VirtualBox GuestX11?

VirtualBox is a free-of-cost x86 virtualization solution that enables a diverse array of x86 operating systems. This package specifically delivers the X11 guest utilities designed for use with VirtualBox. These utilities are intended to operate within the virtual machine, offering enhanced integration and optimizing interactive performance.

Is VirtualBox Guest Additions free?

Yes, VirtualBox Guest Additions are free. VirtualBox is an open-source virtualization platform. Its Guest Additions enable the guest operating system’s performance and features and are also provided as part of the free VirtualBox software.

Is VirtualBox Guest Addition safe?

Yes, VirtualBox Guest Additions are generally safe. These additions are provided by Oracle, to enhance the integration and performance of the guest operating system. It’s safe as long as you download Guest Additions from official sources, such as the VirtualBox website or repositories, and keep your software up-to-date.

Does VirtualBox Guest Additions have a clipboard?

Yes, VirtualBox Guest Additions provides a bi-directional clipboard that allows you to copy and paste text and files between the host and guest operating systems.

Related Articles


<< Go Back to Virtual Machine Installation Guide | Linux OS Installation Guide | Learn Linux Basics

5/5 - (1 vote)
LINUX
FUNDAMENTALS
A Complete Guide for Beginners Enroll Course Now
Auhona Islam

Auhona Islam is a dedicated professional with a background in Electronics and Communication Engineering (ECE) from Khulna University of Engineering & Technology. Graduating in 2023, Auhona is currently excelling in her role as a Linux content developer executive at SOFTEKO to provide a more straightforward route for Linux users. She aims to generate compelling materials for Linux users with her knowledge and skills. She holds her enthusiasm in the realm of Machine Learning (ML), Deep Learning (DL), and Artificial Intelligence (AI). Apart from these, she has a passion for playing instruments and singing. Read Full Bio

3 thoughts on “How to Install VirtualBox Guest Additions on Debian”

  1. Thanks a bunch.
    Debian 12 makes the process to get VBoxLinuxAdditions up and running UNNECESSARILY difficult and complex… I never thought that I would have to go through creating a mount point for cdrom.
    Best,
    T.

    Reply
    • You are very welcome indeed.
      I get your frustration. Essentially, mounting cdrom grants the virtual machine locate and access all the instalaltion files needed for Virtual Box Guest Addition. If you need assistance at any point, feel free to ask anytime.

      Reply
    • Actually, if you use Virtual Box you will see that you have to install the Guest Tools Additions in all Linux distros, even in Windows OS.

      Reply

Leave a Comment