How to Install VirtualBox 6.1 on AlmaLinux 9

VirtualBox is a free and open-source hypervisor for x86 and x86-64 virtualization, which the Oracle Corporation develops. The software targets users wishing to create virtual environments for servers and desktops that allow users and administrations to run multiple guest operating systems on a single computer for either testing methods or production use. VirtualBox may be installed on Windows, macOS, Linux, Solaris, and OpenSolaris.

In the following tutorial, you will learn how to install VirtualBox on AlmaLinux 9 using the RPM Fusion repository to install the latest version of VirtualBox using the command line terminal.

Update AlmaLinux

First, before you begin, perform a quick update to your system to ensure all existing packages are up-to-date to avoid any conflicts during the installation of VirtualBox.

sudo dnf upgrade --refresh

Install EPEL/EPEL Next Repository

The first task is to install the EPEL repository, and the recommendation is to install both repositories.

First, enable the CRB repository.

sudo dnf config-manager --set-enabled crb

Next, install EPEL using the following (dnf) terminal command.

sudo dnf install \ \

Install RPM Fusion Repository

The tutorial will now import the RPM Fusion repository, which often has the most up-to-date VirtualBox packages packaged and ready for you to install. Optionally, you can install the testing repository for those that prefer to get updates even quicker.

First, open your terminal and add the following repositories

Import RPM Fusion Free

sudo dnf install --nogpgcheck$(rpm -E %rhel).noarch.rpm -y

Import RPM Fusion Nonfree (Optional, Not Required)

sudo dnf install$(rpm -E %rhel).noarch.rpm -y

Optional – Enable RPM Fusion TESTING Branch

RPM Fusion has a testing branch that contains mostly incoming new release packages. Often, if you want bleeding-edge updates, having this repository enabled would be best, but obviously, it is not recommended for stability.

First, enable the RPM Fusion Testing repository using the following command.

Enable the Free Repository

sudo dnf config-manager --set-enabled rpmfusion-free-updates-testing

Enable the Non-Free Repository

sudo dnf config-manager --set-enabled rpmfusion-nonfree-updates-testing

Once enabled, proceed to install the drivers or run an update. If new bleeding-edge drivers in a test or, more likely, beta drivers will appear here, and you can begin to update to these, remember they may be buggy, so do not be surprised.

Sometimes you may want to disable the RPM Fusion testing repository. This can be quickly done by using the following command, to re-enable, use the following commands above and rinse and repeat.

Disable the Free Repository

sudo dnf config-manager --set-disabled rpmfusion-free-updates-testing

Disable the Non-Free Repository

sudo dnf config-manager --set-disabled rpmfusion-nonfree-updates-testing

Install VirtualBox

With the setup complete, execute the installation command to install VirtualBox.

sudo dnf install VirtualBox -y

Once installed, the VirtualBox service needs to be enabled; to do this, use the following command.

sudo systemctl enable vboxdrv --now

Verify the status using the command.

systemctl status vboxdrv

Example output:

How to Install VirtualBox 6.1 on AlmaLinux 9

How to Launch VirtualBox

VirtualBox can be launched immediately from your terminal if open with the following command.


However, many users on desktops would use the following desktop path.

Acitivities > Show Applications > Virtualbox


How to Install VirtualBox 6.1 on AlmaLinux 9

Once open, you will arrive at the main screen, where you can begin to create virtual machines. It is very similar for users coming from VMWare, and users new to virtual machines should check out the VirtualBox user manual.


How to Install VirtualBox 6.1 on AlmaLinux 9

How to Update/Upgrade VirtualBox

Updating VirtualBox can be done using the command line terminal with the following standard commands you would have used at the start of the tutorial to check your system for updates.

sudo dnf update --refresh

Most newer Linux users usually set up some automatic updates or rely on the notifications from their desktop especially coming from a Windows-type background. You should always check using the terminal at a minimum once a week to ensure you are not missing any updates. The terminal method will grab all available updates, ensuring your system is up-to-date.

How to Remove/Uninstall VirtualBox

The removal of VirtualBox is straightforward. For users that want to remove the software entirely, use the following command.

sudo dnf autoremove VirtualBox

Comments and Conclusion

Overall, out of the many virtual machine software on the market, VirtualBox is one of the top players supplying an excellent selection of host and client combinations such as Windows from XP onwards, any Linux level 2.4 or better, Windows NT, Server 2003, Solaris, OpenSolaris, and even OpenBSD Unix.


Like to get automatic updates? Follow us on one of our social media accounts!