How to Install VirtualBox an Arch

There are two ways if you wan't to try a new Linx distro without losing your beloved arch install. First boot the distro on a Live USB. Or second use a VM. In this guide I am going to show you how to setup VirtualBox - a VM - on Archlinux


First, we are going to start of by installing the VirtualBox package. If you are prompted to select a package, choose your default (just press "Enter").

# Update the pacman repository cache
$ sudo pacman -Sy
# Then install the virtualbox packages
$ sudo pacman -S virtualbox
Installing the VirtualBox packages with Pacman

If you now would try to run VirtualBox it would fail because we first need to load the VirtualBox kernel module. To load this module automatically on boot, we'll create a file in the /etc/modules-load.d/ directory:

$ sudo nano /etc/modules-load.d/virtualbox.conf
# virtualbox.conf
vboxdrv
Create file and write vboxdrv in it

Then reboot:

$ sudo reboot
Reboot

You'll need to add your useer to the vboxusers group so that you can use VirtualBox without root.

$ sudo usermod -aG vboxusers $(whoami)
Add your user to the vboxusers group

Then reboot again:

$ sudo reboot
Reboot

Finally you can start Virtualbox over your DE or through the therminal:

$ virtualbox
Start virtualbox with the terminal

In this guide I showed you how to setup VirtualBox on Arch.

If I have helped you, consider signing up for free to get access to all my guides and my newsletter.

💪
Consider signing up for free to get access to all my guides and my newsletter