How to Install VirtualBox in Fedora Linux
VirtualBox is a powerful, free, open-source, feature-rich, high performance and cross-platform x86 and AMD64/Intel64 virtualization software for enterprise and home use. It runs on Linux, Windows, Macintosh, as well as Solaris hosts.
In this article, we will show how to install VirtualBox 6.1 on Fedora 31 distribution using the official yum repository.
Note: If you are using the system as a normal or administrative user, employ the sudo command to gain root privileges to run most if not all the commands in this article.
Downloading VirtualBox Repo on Fedora 31
To install VirtualBox on Fedora Linux 30, you first need to download the
virtualbox.repo configuration file using the following wget command.
# wget http://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo -P /etc/yum.repos.d/
Next, update the installed packages on the system and import the VirtualBox public key by running the following dnf command. This ensures that all system updates are installed and that the system is running the most up-to-date kernel included in the distribution.
# dnf update
Installing Development Tools on Fedora 31
If you want to run the Oracle VM VirtualBox graphical user interfaces (VirtualBox), you need to install Qt and SDL packages. However, if you only want to run VBoxHeadless, the aforementioned packages aren’t required.
In addition, the installer will create kernel modules on the system, therefore you need to install development tools (GNU compiler (GCC), GNU Make (make)) and packages containing header files for your kernel for the build process as well.
# dnf install @development-tools # dnf install kernel-devel kernel-headers dkms qt5-qtx11extras elfutils-libelf-devel zlib-devel
Installing VirtualBox 6.1 on Fedora 31
Once the required packages and development tools installed, you can now install VirtualBox 6.0 with the following dnf command.
# dnf install VirtualBox-6.1
During the VirtualBox package installation, the installer created a group called vboxusers, all system users who are going to use USB devices from Oracle VM VirtualBox guests must be a member of that group.
To add a user to that group, use the following usermod command.
# usermod -a -G vboxusers tecmint
At this point, you are ready to start using VirtualBox on your Fedora 31. Search for VirtualBox in the Activities search feature and click on it to launch it.
Alternatively, execute the following command to start VirtualBox from the terminal.
Read Also: How to Enable USB in VirtualBox
Congratulations! You just installed VirtualBox 6.0 on Fedora 31. If you have any questions or thoughts to share with us, use the feedback form below.