How to Install VirtualBox on Arch Linux: A Step-by-Step Guide

Install VirtualBox on Arch Linux like a pro. Follow our comprehensive guide for a smooth, error-free installation process.

VirtualBox is a powerful, free, open-source software that allows you to run multiple operating systems inside virtual machines on top of your OS, each acting like a separate computer.

It’s an excellent tool for testing new software or learning about different operating systems, all within the safe confines of your existing computer.

If you’ve navigated the adventurous waters of installing Arch Linux – a feat often regarded as a challenge in the Linux community – you’re well-prepared for the journey ahead.

This guide is designed to be straightforward and user-friendly, making setting up VirtualBox on your Arch system a breeze. So, letโ€™s dive into virtualization on one of the most esteemed Linux distributions!

Step 1: Install VirtualBox Dependencies

First, you need to install some dependencies, specifically the โ€œvirtualbox-host-modules-archโ€ package. It contains the necessary kernel modules (vboxdrvvboxnetadp, and vboxnetflt) that allow VirtualBox to interact with the Linux kernel.

Using the well-known Pacman package manager, run:

sudo pacman -S virtualbox-host-modules-arch
Install VirtualBox dependencies.
Install VirtualBox dependencies.

Step 2: Install VirtualBox on Arch Linux

Everything is already prepared for the actual installation. Now, to install VirtualBox on your Arch system, run the following commands:

sudo pacman -S virtualbox
Install VirtualBox on Arch Linux.
Install VirtualBox on Arch Linux.

Currently, our installation is prepared and ready for use. You have two options if you want to try it out right now. Firstly, you must manually load the required VirtualBoxโ€™s modules with the command:

sudo modprobe vboxdrv

Alternatively, rebooting your Arch system will automatically load them. However, it’s highly advisable to proceed with the subsequent instructions outlined below for a fully functional and user-friendly VirtualBox experience.

Step 3: Install VirtualBox Extension Pack

This is an optional step, but we strongly encourage it because it will make working with VirtualBox on your Arch box more straightforward and convenient.

The Extension Pack enhances the capabilities of the VirtualBox base package, providing additional features that are useful for both personal and enterprise use. These typically include:

  • USB 2 and USB 3 support
  • VirtualBox Remote Desktop Protocol (VRDP)
  • Host webcam passthrough
  • Disk image encryption with AES algorithm
  • Intel PXE boot ROM
  • Support for NVMe SSDs

Letโ€™s highlight one peculiarity here. The VirtualBox Extension Packโ€™s version is strongly recommended to match the VirtualBoxโ€™s installed version.

So, 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
Check the installed VirtualBox version.
Check the installed VirtualBox version.

As you can see, the version of VirtualBox installed is โ€œ7.0.12.โ€ Therefore, you must then download the Extension Pack with the same version. So, use the below wget command to download the appropriate Extension Pack for VirtualBox.

If your installation is different, replace both places containing โ€œ7.0.12โ€ in the command below with the appropriate version. In addition, you can also go straight to the downloads page and look at the available versions.

wget https://download.virtualbox.org/virtualbox/7.0.12/Oracle_VM_VirtualBox_Extension_Pack-7.0.12.vbox-extpackCode language: JavaScript (javascript)

Next, to install the VirtualBox Extension pack, run the vboxmanage command as follows:

sudo vboxmanage extpack install Oracle_VM_VirtualBox_Extension_Pack-7.0.12.vbox-extpackCode language: CSS (css)

You will be prompted to agree to Oracleโ€™s license terms and conditions. So, type โ€œyโ€ to confirm and press โ€œEnter.โ€

Install VirtualBox Extension Pack.
Install VirtualBox Extension Pack.

Additionally, you can verify installed VirtualBoxโ€™s extension pack version by running the following:

vboxmanage list extpacksCode language: PHP (php)
Verify the installed VirtualBox Extension Pack version.
Verify the installed VirtualBox Extension Pack version.

Step 4: 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 -aG vboxusers $USERCode language: PHP (php)

Now, perform a reboot. After login, check that you are in the “vboxusers” group with this command:

groups $USERCode language: PHP (php)
Check the userโ€™s groups.
Check the userโ€™s groups.

Step 5: Running VirtualBox on Arch Linux

You can start using VirtualBox by launching it from the desktop environmentโ€™s application launcher.

Starting VirtualBox.
Starting VirtualBox.
VirtualBox is installed and runs on Arch Linux.
VirtualBox is installed and runs on Arch Linux.

Bottom Line

By following the steps in this article, users can easily install VirtualBox on their Arch Linux system, whether they are beginners or seasoned Linux enthusiasts.

For detailed and thorough insights on all aspects of this exceptional rolling release distribution, refer to our article “Arch Linux: Everything You Need to Know About It” for valuable information.

We hope this guide has been informative and helpful in getting you started with VirtualBox on Arch Linux. As always, the Arch’s community and VirtualBox’s extensive documentation are valuable resources for troubleshooting and further learning.

Thanks for your time! Your feedback and comments are most welcome. Happy virtualizing!

Bobby Borisov

Bobby Borisov

Bobby, an editor-in-chief at Linuxiac, is a Linux professional with over 20 years of experience. With a strong focus on Linux and open-source software, he has worked as a Senior Linux System Administrator, Software Developer, and DevOps Engineer for small and large multinational companies.

Think You're an Ubuntu Expert? Let's Find Out!

Put your knowledge to the test in our lightning-fast Ubuntu quiz!
Ten questions to challenge yourself to see if you're a Linux legend or just a penguin in the making.

1 / 10

Ubuntu is an ancient African word that means:

2 / 10

Who is the Ubuntu's founder?

3 / 10

What year was the first official Ubuntu release?

4 / 10

What does the Ubuntu logo symbolize?

5 / 10

What package format does Ubuntu use for installing software?

6 / 10

When are Ubuntu's LTS versions released?

7 / 10

What is Unity?

8 / 10

What are Ubuntu versions named after?

9 / 10

What's Ubuntu Core?

10 / 10

Which Ubuntu version is Snap introduced?

The average score is 68%