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 (vboxdrv, vboxnetadp, 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
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
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
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.
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-extpack
You will be prompted to agree to Oracle’s license terms and conditions. So, type “y” to confirm and press “Enter.”
Additionally, you can verify installed VirtualBox’s extension pack version by running the following:
vboxmanage list extpacks
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 $USER
Now, perform a reboot. After login, check that you are in the “vboxusers” group with this command:
Step 5: Running VirtualBox on Arch Linux
You can start using VirtualBox by launching it from the desktop environment’s application launcher.
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!