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 37
- Fedora 36
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. Adding the VirtualBox package repository:
$ cat <<EOF | sudo tee /etc/yum.repos.d/virtualbox.repo [virtualbox] name=Fedora \$releasever - \$basearch - VirtualBox baseurl=http://download.virtualbox.org/virtualbox/rpm/fedora/36/\$basearch enabled=1 gpgcheck=1 repo_gpgcheck=1 gpgkey=https://www.virtualbox.org/download/oracle_vbox.asc EOF
At the time of this writing, the VirtualBox website link in the code above only works for Fedora 36. This still works fine for Fedora 37.
Step 3. Importing the VirtualBox GPG key:
$ sudo dnf search virtualbox
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.