How to Install VirtualBox on Arch Linux: A Step-by-Step Guide
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.
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!
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.
for the linux kernel, choose `virtualbox-host-modules-arch`,
for the linux-lts kernel, choose `virtualbox-host-modules-lts`,
for any other kernel, choose `virtualbox-host-dkms`.
sudo pacman -S virtualbox-host-modules-arch
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.
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
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
You should see a similar message like; the version of VirtualBox
installed is “7.2.2” Download with this command:
wget https://download.virtualbox.org/virtualbox/7.0.12/Oracle_VM_VirtualBox_Extension_Pack-7.2.2.vbox-extpack
Next, to install the VirtualBox Extension pack, run the vboxmanage
command as follows:
sudo vboxmanage extpack install Oracle_VM_VirtualBox_Extension_Pack-7.2.2.vbox-extpack
You will be prompted to agree to Oracle’s license terms and conditions. So, type “y” to confirm and press “Enter.”
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 and that should be all!.
Thanks for your time! Your feedback and comments are most welcome. Happy virtualizing!