VirtualBox 7 is a popular virtualization solution that allows you to run multiple operating systems on a single physical host. This guide will show you how to install it on Fedora 41, a Red Hat-supported Linux distro known for its cutting-edge software, user-friendliness, and great support.
Simply follow the steps outlined below, which we tested and proven to work, and youโll be up and running in no time with a system ready to meet all your virtualization needs.
Disclaimer: While this guide focuses on installing VirtualBox on Fedora 41, itโs equally applicable to earlier versions, such as 40, 39, etc.
Step 1: Install VirtualBox Dependencies
First, you need to install some dependencies. These are specific software packages that are required for VirtualBox to run properly.
Using the DNF package manager, we will install the “development-tools” meta package and several kernel-related packages required for VirtualBox to function.
Open the terminal and run the following two commands:
sudo dnf install @development-tools
sudo dnf install kernel-headers kernel-devel dkms
Code language: Bash (bash)
Step 2: Add VirtualBox Repository to Fedora
Next, we will add the official VirtualBox repository to our Fedora 41 system. This implies that the update package will be made available with the rest of your systemโs regular updates if a new version is released.
Using your preferred terminal text editor, create the “/etc/yum.repos.d/virtualbox.repo” file:
sudo nano /etc/yum.repos.d/virtualbox.repo
Code language: Bash (bash)
Then, put the content provided below in it, save it, and exit the file.
[virtualbox]
name=Fedora $releasever - $basearch - VirtualBox
baseurl=http://download.virtualbox.org/virtualbox/rpm/fedora/$releasever/$basearch
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://www.virtualbox.org/download/oracle_vbox_2016.asc
Code language: Bash (bash)
Next, refresh the package list. When prompted, type “y” to agree to import the GPG key signing packages from Oracle’s official VirtualBox repository.
sudo dnf update
Code language: Bash (bash)
You can safely ignore the error shown above. Itโs not something you can fix on your side since itโs tied to the repository itself (come on, Oracle, do something), but donโt worryโit doesnโt affect the installation of VirtualBox at all.
Step 3: Install VirtualBox on Fedora 41
Finally, we are all set for the actual installation. Now, to install VirtualBox on your Fedora 41 system, run the following commands:
sudo dnf install VirtualBox-7.1
Code language: CSS (css)
During installation, you will be prompted to import the GPG key again. Type “y” and press “Enter.” Next, you’ll be asked if you accept importing VirtualBox’s signing key. Just type “y” again.
Wait for the installation to complete. Now that VirtualBox is installed and ready to roll on your Fedora 41 system, there’s one more step before we seize its opportunities.
Step 4: Install VirtualBox Extension Pack
This is an optional step, but I strongly encourage it because it will make working with VirtualBox on your Fedora system easier and more convenient. VirtualBox Extension Pack unlocks many great features, such as:
- USB 2 and USB 3 support
- VirtualBox Remote Desktop Protocol (VRDP)
- Host webcam passthrough
- Disk image encryption with AES algorithm
- Intel PXE boot ROM
Hereโs an interesting point: Although not obligatory, itโs strongly advised that you ensure the version of the VirtualBox Extension Pack you install matches the version of VirtualBox on your Fedora 41 system.
To verify the exact version of the installed locally VirtualBox, you can use vboxmanage
, a build-in VirtualBoxโs command:
vboxmanage -v | cut -dr -f1
As you can see, Virtualbox’s installed version is โ7.1.4.โ So, weโll use the below wget command to download VirtualBoxโs Extension Pack with the same version.
If your installation is different, replace both places containing “7.1.4” in the command below with the current version. You can also go straight to the downloads page and look at the available versions.
wget https://download.virtualbox.org/virtualbox/7.1.4/Oracle_VirtualBox_Extension_Pack-7.1.4.vbox-extpack
Code language: Bash (bash)
Next, to install the VirtualBox Extension pack, run the vboxmanage
command as follows:
sudo vboxmanage extpack install Oracle_VirtualBox_Extension_Pack-7.1.4.vbox-extpack
Code language: Bash (bash)
You will be prompted to agree to Oracleโs license terms and conditions. To confirm, type โyโ and press โEnter.โ
Additionally, you can verify installed VirtualBoxโs extension pack version by running the following:
vboxmanage list extpacks
Code language: PHP (php)
Step 5: Add User to vboxusers Group
Before using VirtualBox, add your user account to the “vboxusers” group. This is quick and simple to accomplish by running:
sudo usermod -a -G vboxusers $USER
Code language: Bash (bash)
Now, perform a reboot. After login, check that you are in the “vboxusers” group with this command:
groups $USER
Code language: Bash (bash)
Step 6: Running VirtualBox on Fedora 41
Launching it from the desktop environmentโs application menu, you can now start using VirtualBox. Type โvirtualboxโ and click on the icon when it appears.
To start creating a new virtual machine, use the “New” button.
How to Uninstall VirtualBox
If you want to uninstall VirtualBox from your Fedora system for some reason, you can easily do so by running the command below.
sudo dnf remove VirtualBox-7.1
Code language: Bash (bash)
Then you have two choices: disable the VirtualBox repository on your Fedora system:
sudo dnf config-manager setopt virtualbox.enabled=0
Code language: Bash (bash)
Or completely remove it by deleting the repo’s file:
sudo rm /etc/yum.repos.d/virtualbox.repo
Code language: Bash (bash)
Conclusion
Installing VirtualBox 7.1 on Fedora 41 can give users a powerful and versatile virtualization solution for running multiple operating systems on a single machine.
With Fedora 41 as the host operating system, you can now take advantage of its stability, security, and cutting-edge software, making it a reliable platform for virtualization.
However, VirtualBox isnโt the only player in the virtualization gameโVMware Workstation is another excellent and reliable option. If youโre thinking about giving it a try, weโve got you covered with a step-by-step guide on setting it up on Fedora.
Thanks for using this tutorial! Any feedback is welcomed in the section below.