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 
[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

All done. Launch VirtualBox from your system menus or from the terminal using the following command:

$ virtualbox

1 thought on “How to Install VirtualBox on Fedora 37/36”

Leave a Comment

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