How to Install VirtualBox Guest Additions in Fedora

As you might know, VirtualBox is an open-source hypervisor that allows users to create virtual machines and test-run different operating systems. But it doesn’t end there.

VirtualBox also includes VirtualBox guest additions which are additional applications and drivers that improve the performance and usability of a virtual machine.

VirtualBox guest additions provide extended features such as:

  • Shared Clipboard: You can seamlessly copy and paste content between the host and guest operating systems.
  • Drag and Drop: Additionally, Virtualbox guest additions enable you to drag and drop files between the host and guest operating systems.
  • Mouse Pointer Integration: Recall how you usually have to press a combination of keys to release the mouse pointer from the virtual machine? With Virtualbox guest additions, that becomes a thing of the past as you can comfortably move your mouse pointer to and from the guest and host OS.
  • Shared Folders: The guest additions also enable you to make folders that can be accessed by the virtual machine as network shares.
  • Enhanced Video Performance: By default, virtual machines come with a display that is much smaller and does not provide a resolution that matches that of the host system. With guest addition installed, the virtual machine adjusts to match the resolution of the host system. For example, if the host’s resolution is 1366 x 768, the virtual machine automatically scales from its default resolution to match the host’s resolution.

Let’s now see how you can install VirtualBox guest additions on Fedora Linux distribution.

Installing VirtualBox Guest Additions in Fedora

To install and enable VirtualBox guest additions on your Fedora Linux, you must have VirtualBox installed on your system, if not install it using our guide: How to Install VirtualBox in Fedora Linux.

Step 1: Install Kernel Headers and Build Tools

The first step in the installation of VirtualBox guest additions is the installation of kernel headers. This includes the installation of the dkms package (Dynamic Kernel Module Support) alongside other build tools as shown.

$ sudo dnf install dkms kernel-devel gcc bzip2 make curl
Install Kernel Headers in Fedora
Install Kernel Headers in Fedora

Once you have successfully installed kernel headers, you need to confirm the version of the Linux kernel and ensure it matches the version of the just installed kernel headers.

To check the version of the Linux kernel run the command.

$ uname -r 
$ hostnamectl | grep -i kernel

To check the version of the kernel development tool (kernel-devel) execute.

$ sudo rpm -qa kernel-devel
Verify Linux Kernel Headers
Verify Linux Kernel Headers

If the versions of the two (kernel version and kernel-devel) do not match as shown in the screenshot above, update the kernel using the command.

$ sudo dnf update kernel-*

When you are done updating the kernel, reboot the system, and again, verify the kernel version again.

$ uname -r 
Verify Kernel Version
Verify Kernel Version

From the output, you can see that the kernel version now matches the kernel-devel version.

Now you can proceed and install VirtualBox guest additions.

Step 2: Install VirtualBox Guest Additions in Fedora

To install guest additions, navigate to Devices –> Insert Guest Additions CD image.

Insert Guest Additions CD
Insert Guest Additions CD

In the pop up that appears, select the Cancel option.

VirtualBox Guest Addition Auto Install
VirtualBox Guest Addition Auto Install

Then navigate to /run/media/username/VBox_GAs_6.0.18. Be sure to replace the username attribute with the currently logged in user. You should get the files shown below.

$ cd /run/media/username/VBox_GAs_6.0.18
VirtualBox Guest Addition Files
VirtualBox Guest Addition Files

Finally, run the script to install guest additions. This will take about 4-5 minutes to install all the necessary applications.

$ sudo ./
Install VirtualBox Guest Additions
Install VirtualBox Guest Additions

Upon completion of the installation of VirtualBox modules, reboot your Fedora system and this time, it will display a full screen and you can now enjoy all the functionalities that come with guest additions.

Fedora Desktop
Fedora Desktop

We have come to the end of this guide. Your feedback is much welcome.

Hey TecMint readers,

Exciting news! Every month, our top blog commenters will have the chance to win fantastic rewards, like free Linux eBooks such as RHCE, RHCSA, LFCS, Learn Linux, and Awk, each worth $20!

Learn more about the contest and stand a chance to win by sharing your thoughts below!

James Kiarie
This is James, a certified Linux administrator and a tech enthusiast who loves keeping in touch with emerging trends in the tech world. When I'm not running commands on the terminal, I'm taking listening to some cool music. taking a casual stroll or watching a nice movie.

Each tutorial at TecMint is created by a team of experienced Linux system administrators so that it meets our high-quality standards.

Join the TecMint Weekly Newsletter (More Than 156,129 Linux Enthusiasts Have Subscribed)
Was this article helpful? Please add a comment or buy me a coffee to show your appreciation.

1 Comment

Leave a Reply
  1. I am a new old person that tries to learn a little more about Linux, and sometimes I face problems during the installation or later when I use a new OS then I look for information on the web.
    The Guest addition CD image is one of them, sometimes is no a problem but in another OS it is a problem, and I found the information on this page


Got Something to Say? Join the Discussion...

Thank you for taking the time to share your thoughts with us. We appreciate your decision to leave a comment and value your contribution to the discussion. It's important to note that we moderate all comments in accordance with our comment policy to ensure a respectful and constructive conversation.

Rest assured that your email address will remain private and will not be published or shared with anyone. We prioritize the privacy and security of our users.