How to Install VirtualBox Guest Additions on Ubuntu 24.04


Not all of us install Ubuntu 24.04 on a bare computer or dual-boot it with Windows. Sometimes you might need to test the new features before completely upgrading your old Ubuntu 22.04 system. Likewise, you may also want to test any Linux applications, so instead of installing Ubuntu on your main PC, you can create a virtual machine.

To maximize your experience with the Ubuntu virtual machine, you will need VirtualBox Guest Additions. These are the system drivers and applications that optimize your working experience between the Host and Guest machine. This article covers virtual box guest addition installation on the Ubuntu 24.04 system.

Table of Contents:

1. Why You Need VirtualBox Guest Additions

VirtualBox Guest Additions is a set of tools that improve your working experience between the Host and Guest machine. With Guest Additions installed, you can seamlessly transfer files between both these machines and also use features like adaptive display and clipboard sharing.

Following are a few notable features that you get after setting the Guest Additions for your Ubuntu 24.04 system:

  • Mouse pointer integration
  • Bidirectional communication channels between host and guest
  • Drag-and-drop functionality
  • Automatic Window Resizing
  • Guest Control File Manager
  • Guest Properties
  • Clipboard sharing

2. How to Install VirtualBox Guest Additions on Ubuntu 24.04

To install VirtualBox Guest Additions, you have to install the necessary packages and then mount the Guest Additions CD image. Once the mount is done, run the installer, and you are all set to navigate between the Host and Guest machine.

Follow the below simple steps to complete the Guest Additions installation.

Step 1: First start by updating your system:

sudo apt update

Step 2: Next, install some necessary packages needed to run the VirtualBox Guest Additions installer:

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

Step 3: The next step is to mount the CD image of VirtualBox Guest Additions. For this, go to Devices and select Insert Guest Additions CD Image from the dropdown menu.

This will virtually mount your guest addition image with Ubuntu 24.04. You will see a CD icon on your Ubuntu desktop menu bar.

Step 4: Next you can either directly open the Guest Addition folder by double-clicking the CD image or run the following command in the terminal to navigate to it.

cd /media/linux/VBox_GAs_7.0.4/

Note: The above command will take you to the guest addition CD image directory, but make sure to modify the name of the Guest Addition image in the above command. The exact name depends on the VirtualBox version you are using.

Step 5: Finally, run this command to install Virtual Box Guest Additions in your Ubuntu 24.04 system:

sudo ./VBoxLinuxAdditions.run

Step 6: Now reboot your Ubuntu 24.04 to apply all the changes:

sudo reboot

In the above steps, we have used the Ubuntu terminal for Guest Additions installation, but you can also do the same installation using the graphical method. For that, simply click the CD image shown on the side menu.

This will open the Guest Additions directory that we mounted earlier. Now click on Run Software. This will auto-install the Guest addition on your system. Password is required for Ubuntu system authentication.

If Run Software does not work for you, then right-click the autorun.sh file and select the Run as Program option. The Guest Additions will start installing on Ubuntu 24.04.

2.1. Verifying VirtualBox Guest Addition Installation

Once the VirtualBox Guest Addition installation is done, you can confirm its installation by changing the screen resolution or changing the window size of the virtual box. If the Ubuntu desktop adjusts accordingly, it means your Guest Addition installation is done successfully.

3. Basic Features of VirtualBox Guest Additions

VirtualBox guest additions are not only limited to changing screen resolution. You can try some other daily-driven features also. Some features are discussed below.

3.1. Configure Clipboard Sharing

Clipboard sharing is one of those features that we all need while communicating between the Host and Guest machine. Especially if you are a tech enthusiast and used to copy commands, then you must enable it for your system.

To start Clipboard sharing between Host and Guest (Ubuntu 24.04) open the menu and select Devices. Next, select Drag and Drop and set it to Bidirectional.

After doing this, simply restart your system and you are all set.

3.2. Configure Dag and Drop

Similarly, sharing files between Ubuntu and the host machine can also be done using the drag-and-drop function. By this method, you can share important files and folders across the machines seamlessly.

To start this feature, go to the menu and select Devices. Now set the Shared Clipboard option to Bidirectional.

To apply these settings, simply restart the Ubuntu 24.04 virtual machine.

4. Uninstalling VirtualBox Guest Additions

You are not going to need the below command most of the time, but if you want to remove the VirtualBox Guest Addition for Ubuntu 24.04 then run this command:

sudo vbox-uninstall-guest-additions

This will uninstall the VirtualBox Guest Additions from your system

Conclusion

VirtualBox Guest Additions are a set of tools that improve the working experience between the Host and Guest machine. To install it, first mount the CD image from the settings and then install some prerequisite packages. After that, you can install Guest Additions either through the terminal or by simply running the Guest Addition installer file. Finally, restart Ubuntu 24.04 to apply all these changes.

Print Friendly, PDF & Email
Categories