I am not exaggerating. Installing Ubuntu or Debian is a lot easier task than Arch Linux because it doesn’t have an official GUI based installer. And this is where virtual machines come in.
You can try installing Arch Linux in VirtualBox first and see if it’s something you would like to run on actual hardware. This way, you get to experience Arch Linux without disturbing your current operating system.
In this article, I will be guiding you through the steps to install a functional Arch Linux virtual machine.
Installing Arch Linux on VirtualBox
Undoubtedly, you need to first install VirtualBox on Linux or Windows. On Windows, simply go to the Oracle’s website and download VirtualBox.
If you are using Windows 10 or newer version, please ensure that you have virtualization enabled on your system.
Hold on to the ISO file when needed, you can delete it to free space on your system after successful installation.
Now, let us begin installing Arch Linux on VirtualBox.
Part 1. Creating the Virtual Machine
Step 1: First, you need to set up a few things in VirtualBox. Launch VirtualBox and click on “New” to create a virtual machine.
Note that you can continue creating the virtual machine using the guided mode, but you get more options at a single glance with the expert mode.
Hence, I recommend using the expert mode to create the virtual machine.
Fret not, the expert mode is as easy, with just a bit of extra available options and nothing else to worry about.
Step 2: Enter the name of your virtual machine, it should auto-detect the “Type” and “Version” respectively when you type in “Arch Linux” in the name field.
You should increase the memory size to use the virtual machine comfortably. If it is just for minor testing, you can go ahead with the default setting.
In my case, I allocate ~4 GB of RAM.
Also, make sure to create a virtual hard disk under the “Hard disk” option. It should be the selected option by default.
Now, proceed to set the virtual hard disk size.
Step 3: You can choose a preferred location path for the virtual hard disk and tweak the size as per your requirements. The installation should not be a problem with the minimum allocated size (8 GB), but to be on the safe side, you may want to allocate at least 10-15 GB.
Next, you need to select the hard disk file type as “VDI (VirtualBox Disk Image)” and the storage as “Dynamically allocated,” as shown in the image above.
VDI is the most common hard disk type for the virtual hard disk.
And, when you select the “Dynamically allocated” option for the hard disk storage, it means that the storage space will be utilized as per usage. In other words, 15 GB of space won’t be locked from your disk as soon as the virtual machine is created.
Now, all you have to do is hit “Create” to add the virtual machine.
Part 2. Adding the ISO File to Start Installing Arch Linux
Once the VM has been listed, you can look at its configuration and select the ISO as the disk drive under the Storage option.
You can also separately head to the virtual machine settings to explore more and choose the ISO file.
To do that, navigate your way to the “Storage” setting of the VM.
Here, you will have to click on the “Empty” device under Controller and then proceed to select the Arch Linux ISO file as the disk file (as shown in the image above).
Once you select it, hit “OK” to save the changes to your setting.
Here’s how the virtual machine setting should look like with the ISO set as the disk to boot:
Now, hit “Start” to start the VM and get started with the installation.
Part 3. Installing Arch Linux using the Guided Installer
Arch Linux has made the installation easier by introducing a guided installer, i.e., it gives you all the options you need to set up a full-fledged Arch Linux system.
So, with the help of a guided installer, you do not have to install a desktop environment and other essential packages yourself separately. All you have to do is follow the onscreen instructions and choose the options suitable for your installation.
In this article, we focus on the guided installer. If you want to do things yourself, you should follow our Arch installation guide.
Moving on to the installation, when you start the VM, you will be looking at this screen:
The first option is the ideal way of proceeding. If you have a specific requirement, you can choose other options to boot up Arch Linux.
Now, you should be looking at a terminal window. Here’s how to get started:
Step 1: Type in “archinstall” to initiate installation using the guided installer.
Step 2: Choose a keyboard layout as per your requirements, selecting a US layout should be the most common choice. Just type in a number to make the selection, as shown in the image below (for instance, 26).
Step 3: Next, you need to select a region to download packages.
Choosing a preferred region instead of “Worldwide” is crucial because it downloads many unnecessary packages if you select “Worldwide” as your region.
Step 4: Once you select the region, it will ask you to choose the drive for installation. In this case, we already created a virtual drive of ~15 GB displayed as /dev/sda.
Similarly, check for the drive you created as per the size and choose that disk to proceed. Here, I type in 1 as the input; yours can differ.
Step 5: For the next set of steps, you will be asked the following:
- Select a filesystem type
- Encryption password (optional)
- Create root password (optional)
- Creating a super-user
- Choose a pre-programmed profile
In my test, I chose BTRFS as the filesystem without setting any disk encryption password.
The hostname can be anything of your choice, but I’d suggest keeping it short.
You may choose to create a root password, but it shouldn’t be an issue if you do not. However, you need to create a superuser with Sudo privileges.
I used “admin” and “pass” as the user and the password, respectively. But, you should not use easy-to-guess credentials if you do not want anyone else to access the VM on your computer.
And, then, you will be shown a choice to select a profile. In this case, we want a full-fledged Arch Linux desktop. So, we choose “desktop” by typing in 0.
Step 6: Next, you will be asked to choose a desktop environment. I decided to proceed with KDE. You can select anything else you like.
Step 7: To finalize, you will be asked to choose the graphics card driver. Here, we install Arch Linux on VirtualBox, so you can select option 4 as “VMware/VirtualBox,” as shown in the image below.
You may also be asked to choose pipewire instead of PulseAudio for audio with a “Yes (y) or No (no)” response. Any of those should serve the purpose.
Step 8: Next comes an important step. Here, you can choose to go with linux-lts if you need the LTS version of the kernel, or else proceed with the default.
The installer will prompt you to explicitly install any packages required. In this case, we do not have any specific requirements, so we will leave it blank and press enter to skip.
Step 9: To enable internet access, you will be asked to select the required network adapter. You will have to choose the option:
Use network manager to control and manage your internet connection
Step 10: The timezone needs to be defined in the next step. Choose what applies to you, or continue with the default option.
Step 11: Once done, it will display most of the options you selected as confirmation. Press Enter to continue.
Step 12: It will take a few minutes for the installation to complete, depending on your internet connection speed.
After the installation is complete, it will ask you to chroot into a newly created installation for post-installation configuration, but we don’t need that. So, type in “N” to complete the installation.
Step 13: Finally, you should see the terminal window again. Type in:
This will safely exit the installation and close the virtual machine.
It’s all set! Before starting the virtual machine with Arch installed, you need to do one more thing – remove the ISO disk selected as the optical drive. Similar to how you added the ISO to boot from, you can head to the virtual machine settings and remove it as shown below:
That’s it! You are done installing Arch Linux on VirtualBox.
All you have to do is start the virtual machine, and here’s how it looks in my case:
Even though it takes a bit of time to go through the options, the new guided installer on Arch Linux saves a lot of time to get the essentials right.
The same set of steps apply for installing Arch Linux on your computer. You need to make a separate bootable USB drive using Etcher with the Arch Linux ISO file.
Arch Linux is a popular choice for a variety of reasons. However, if it is your first time installing, or if you want to test it out, a virtual machine is the best way to experience it without disrupting your host computer.
I hope this helps you install Arch Linux on VirtualBox. Let me know your thoughts in the comments down below.