In this tutorial, you will learn how to install Oracle VirtualBox on Fedora Linux. VirtualBox is a very easy-to-use solution for all of your virtualization needs on Fedora, allowing you run different Linux distros, Windows, MacOS, and BSD as guest operating systems.
These instructions have been verified to work on the most recent Fedora versions:
- Fedora 38
- Fedora 37
Step 1. First, install the required dependencies:
$ sudo dnf -y install @development-tools $ sudo dnf -y install kernel-headers kernel-devel dkms elfutils-libelf-devel qt5-qtx11extras
Step 2. Next, we will add the VirtualBox package repository by downloading it from virtualbox.org:
$ sudo wget -P /etc/yum.repos.d/ https://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo
Step 3. Import the VirtualBox GPG key:
$ sudo dnf search virtualbox
Answer Y when asked for confirmation.
Step 4. Finally, install the latest version of VirtualBox:
$ sudo dnf install VirtualBox-7.0
Step 5. Add your user to the vboxusers
group to enable USB usage:
$ sudo usermod -aG vboxusers $USER
All done. Launch VirtualBox from your system menus or from the terminal using the following command:
$ virtualbox
Thank you very much for your help. I am finally able to use virtualbox properly.
Hi, I was not able to get virtualbox working because the following error occurred on vm startup: Kernel driver not installed
Make sure that you have run the two
dnf
commands in step 1 to install the prerequisites. If you still receive the error, it’s probably because you have Secure Boot enabled in UEFI.Thanks, if you cant enumerate USB devices:
$ sudo usermod -a -G vboxusers $USER
Regards,
Thanks! We’ve updated the tutorial to include your suggestion.
According to https://www.virtualbox.org/ticket/21451#comment:7 – you can now get the appropriate repo file from https://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo
I’ve tested it on F37, and from the comments it also work son F38…
Thanks. Just tested on Fedora 38 and it works. We’ve updated the tutorial to include this information.
Thank you.
This step-by-step worked like a charm for me.
On a side note, following advice by Perplexity.ia if ( after sudo usermod -aG vboxusers $USER ) the groups command does not show vboxusers then check that grep vboxusers /etc/group and, in case you don’t want to reboot in order for the changes to take place, you may do this: newgrp vboxusers