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.

If You Appreciate What We Do Here On TecMint, You Should Consider:

TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

Support Us

We are thankful for your never ending support.

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.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide
The Complete Linux System Administrator Bundle
Become an Ethical Hacker Bonus Bundle

You may also like...

Got something to say? Join the discussion.

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.