How to Install VirtualBox on Fedora 37/36

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 
name=Fedora \$releasever - \$basearch - VirtualBox
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

5 thoughts on “How to Install VirtualBox on Fedora 37/36”

  1. Hi, I was not able to get virtualbox working because the following error occurred on vm startup: Kernel driver not installed

    1. 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.

Leave a Comment

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