How To Install VirtualBox on AlmaLinux 8 | Quick and Easy
In this guide, we will teach you how to install VirtualBox on AlmaLinux 8. VirtualBox is a GUI and command-line tool that allows you to deploy servers, desktops, and embedded operating systems as VMs. A single VirtualBox host can deploy as many guest VMs as the host hardware can handle.
VirtualBox consists of hosts and guests. The host houses the VirtualBox software that can then deploy the guests. A guest is any supported operating system running as a VM. A VirtualBox host can be run on Linux, Windows, or macOS, whereas a VirtualBox guest can consist of any Linux distribution, Solaris, macOS, BSD, IBM OS/2, or Windows.
You can now proceed to the guide steps below on the Orcacore website to complete How To Install VirtualBox on AlmaLinux 8 setup.
To install VirtualBox, you must log in to your server as a non-root user with sudo privileges. To do this, you can follow our guide on the Initial Server Setup with AlmaLinux 8.
Now, follow the steps below to complete this guide.
1. Add VirtualBox Repository on AlmaLinux 8
By default, VirtualBox packages aren’t available in the default AlmaLinux repository. So you need to add it manually to your server. To do this, you can use the following command:
sudo dnf config-manager --add-repo=https://download.virtualbox.org/virtualbox/rpm/el/virtualbox.repo

Then, update your local package index with the following command:
sudo dnf update -y
In your output, you should see VirtualBox repository has been added.

Then, run the following command to install the EPEL release and enable PowerTools:
# sudo dnf install epel-release -y
# sudo dnf config-manager --set-enabled powertools
2. Install Latest Version of VirtualBox on AlmaLinux 8
At this point, you can list available versions of VirtualBox on AlmaLinux 8 by running the command below:
sudo dnf search virtualbox

As you can see, the latest available version of VirtualBox is 7.1. To install it on your server, run the command below:
sudo dnf install VirtualBox-7.1 -y
Once you are done, proceed to the following step to get the VirtualBox extension pack.
3. Install VirtualBox Extension Pack
At this point, you can add a VirtualBox Extension Pack to have support for various VirtualBox functions. To do this, visit the VirtualBox Downloads page, and click on Accept and download.

Click on All Supported Platforms to download it. Then, from your command terminal, switch to your downloads directory:
cd Downloads
Finally, use the VBoxManage tool
for the installation of the Extension Pack:
sudo VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-*.vbox-extpack
Accept the License when it prompts for the same.
4. Launch Oracle VM VirtualBox
At this point, you can start your VirtualBox application on AlmaLinux 8. To do this, go to Activities, click on “Show Applications,” and then click the icon of this open-source virtualization platform.
Also, you can launch VirtualBox from the command line. Simply type the following command:
virtualbox
You will see the Oracle VM VirtualBox Manager:

That’s it. You are done.
Conclusion
In conclusion, How To Install VirtualBox on AlmaLinux 8 is a straightforward process that involves enabling the required repositories and installing dependencies. VirtualBox provides a reliable and efficient virtualization environment for running multiple operating systems on your AlmaLinux 8 system.
Hope you enjoy it. Please subscribe to us on Facebook and Twitter.
You may also like to read the following articles:
Resolve signature verification error in Kali Linux
Install AlmaLinux on Windows with WSL CLI
Install Cacti on Ubuntu 24.04
Install Ubuntu 25.04 on VMware Workstation
Alternative Solutions for Installing VirtualBox on AlmaLinux 8
While the above method using the official VirtualBox repository is the recommended way, there are alternative methods, though potentially less convenient or suitable for all users. Here are two alternatives:
1. Using RPM Fusion Repository
RPM Fusion is a repository that provides software that the Fedora project (and therefore, derivates like AlmaLinux) cannot ship due to licensing restrictions. While not officially endorsed by VirtualBox, they often package VirtualBox. Using RPM Fusion can sometimes offer a slightly different or more streamlined installation experience, but it’s crucial to understand that support will primarily come from the RPM Fusion community.
Explanation:
RPM Fusion is a third-party repository. By using it, you are relying on their packaging and maintenance. This can be a good alternative if you prefer using a well-established community repository. However, ensure that the RPM Fusion version is compatible with your AlmaLinux 8 system.
Steps:
-
Enable the RPM Fusion repository:
First, you need to enable the RPM Fusion repository. This typically involves installing the
rpmfusion-free
repository. Use the following command:sudo dnf install https://download1.rpmfusion.org/free/el/rpmfusion-free-release-8.noarch.rpm
-
Update the package index:
After enabling the repository, update the package index to include the new packages.
sudo dnf update -y
-
Install VirtualBox:
Now you can install VirtualBox from the RPM Fusion repository.
sudo dnf install VirtualBox -y
Note that the package name might be slightly different (e.g.,
VirtualBox
). It’s a good idea to usednf search virtualbox
to confirm the exact package name before installing. -
Install VirtualBox Extension Pack
Download the extension pack that matches your installed VirtualBox version from the official VirtualBox website, and install it as described in the original article.
Considerations:
- The RPM Fusion repository might not always have the latest version of VirtualBox immediately available.
- You are relying on the RPM Fusion maintainers for updates and compatibility.
2. Using a Pre-Built RPM Package (Less Recommended)
Downloading a pre-built RPM package directly from the VirtualBox website or another source, and installing it using rpm
or dnf localinstall
.
Explanation:
While this approach seems straightforward, it often leads to dependency issues and is generally discouraged unless you are very familiar with RPM package management. You become responsible for manually resolving any missing dependencies, which can be time-consuming and error-prone.
Steps (Discouraged – Use with Caution):
-
Download the RPM Package:
Go to the VirtualBox downloads page (or a mirror) and find the RPM package for Red Hat Enterprise Linux 8 / Oracle Linux 8 (which should be compatible with AlmaLinux 8). Download the file.
-
Install the RPM Package:
Use the
dnf localinstall
command to attempt to install the package. This command will try to resolve dependencies.sudo dnf localinstall /path/to/VirtualBox.rpm
Replace
/path/to/VirtualBox.rpm
with the actual path to the downloaded RPM file. -
Address Dependency Issues (likely):
dnf localinstall
may automatically resolve dependencies. If it doesn’t, you’ll receive errors indicating missing packages. You’ll then need to manually find and install those packages, potentially by searching online and downloading more RPMs, which can quickly become a dependency hell.
Code Example (Illustrating potential dependency resolution – NOT comprehensive):
Let’s say the dnf localinstall
command reports a missing dependency called libQt5Widgets
. You would then try to install it:
sudo dnf install libQt5Widgets
If that fails, you might need to search for the correct package name (it might be qt5-qtbase-gui
or something similar). You may also need to enable other repositories if the package is not found in the default repositories.
Why this is Less Recommended:
- Dependency Hell: Resolving dependencies manually can be extremely tedious and complex, especially for larger applications like VirtualBox.
- Security Risks: Downloading RPMs from untrusted sources can expose your system to security vulnerabilities.
- Maintenance Nightmare: Keeping track of manually installed packages and their dependencies can be challenging, making future updates and upgrades difficult.
In Summary:
While RPM Fusion can be a viable alternative for How To Install VirtualBox on AlmaLinux 8, directly installing RPM packages is generally not recommended due to the high risk of dependency problems and security concerns. The method described at the beginning of the article is the most supported and robust.