Arch Linux is very popular in the desktop Linux world. One of the reasons for its popularity is that installing Arch Linux itself is a complicated task.
I’m not exaggerating. Installing Ubuntu or Debian is a much easier task than Arch Linux because they have GUI-based installers.
Arch doesn’t have that. Only lately, it introduced an official installation script. There is no official GUI installer yet.
That’s why installing Arch becomes a challenge; this is where virtual machines come in.
You can try installing Arch Linux on VirtualBox first and see if it’s something you’d like to run on real hardware. This way, you can experience Arch Linux without disturbing your current operating system.
In this article, I will walk you through installing a functional Arch Linux system in a virtual machine.
Linux on VirtualBox
Clearly, you need to install VirtualBox on Linux or Windows first. On Windows, simply go to Oracle’s website and download VirtualBox.
If you are using Windows 10 or a newer version, make sure virtualization is enabled on your system.
Once done, you should head to the official Arch Linux website to download the ISO file. You should find options to download using torrent or download the file directly.
Keep the ISO file when needed; You can delete it to free up space on your system after successful installation
Now, let’s start installing Arch Linux on VirtualBox
Part 1. Creating the virtual machine
Step 1: First, you need to configure a few things in VirtualBox. Start VirtualBox and click “New” to create a virtual machine.
<img src="https://itsfoss.com/content/images/size/w600/wordpress/2022/11/arch-linux-official-download-page.png" alt="select new button to create a new virtual machine
to create a new virtual machine
Note that you can continue to create the virtual machine using guided mode, but you get more options at a glance with expert mode.
Therefore, I recommend using expert mode to create the virtual machine
Don’t worry, expert mode is just as easy, with just a little extra options available and nothing else to worry about.
Step 2 : Enter the name of your virtual machine, it should automatically detect the “Type” and “Version” respectively when you type “Arch Linux” in the name field. In newer versions of VirtualBox, you can select the ISO file from here.
You must increase the memory size to use the virtual machine comfortably. If it is only for minor tests, you can proceed with the default settings.
In my case, I allocate ~3GB of RAM and 2 processor cores.
Also, make sure to create a virtual hard disk in the “Hard Disk” option. It should be the option selected by default. (In newer versions of VirtualBox, this option is included in the next step.)
<img src="https://itsfoss.com/content/images/wordpress/2022/11/select-expert-mode-in-virtualbox.png" alt="provide RAM and CPU cores for the virtual machine
the virtual machine
Now, proceed to set the size of the virtual hard disk.
Step 3: You can choose a preferred location path for the virtual hard disk and adjust the size according to your requirements. To set the hardware parameters, you need to check the Create a virtual hard disk now box.
Installation shouldn’t be an issue with the minimum size allocated (8 GB), but to be safe, you might want to allocate at least 10-15 GB.
The hard disk file type will be VDI (VirtualBox Disk Image) by default. In addition, memory allocation is set to dynamic by default. If you want to assign the full size at the beginning, you can select the Preassign full size checkbox.
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 type of hard disk for virtual hard disk.
And, when you select the “Dynamically allocated” option for hard disk storage, it means that the storage space will be used according to usage. In other words, 10 GB of space will not be locked from the disk as soon as the virtual machine is created.
Now, all you have to do is hit “Finish” to add the virtual machine.
Arch Linux virtual machine setup You can start the virtual machine either by
pressing the Start button or by double-clicking the virtual machine.
Part 2: Installing Arch Linux Using Arch Linux
Guided Installer has made installation easier by introducing a guided installer, i.e. giving you all the options you need to set up a full Arch Linux system.
So, with the help of a guided installer, you don’t have to install a desktop environment and other essential packages yourself separately. All you have to do is follow the on-screen instructions and choose the right options 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 installation, when you start the VM, you will see this screen:
The first option is the ideal way to proceed. If you have a specific requirement, you can choose other options to start Arch Linux.
Now, you should be looking at a terminal window. Here’s how to get started
Step 1: Type “archinstall” to start the installation using the guided installer.
This will take us to the new Menu-based installer.
There are options available to modify many things. Here, defaults for many of the settings such as language, keyboard layout, etc. are fine. So, just describe the other relevant menu to complete the installation.
Step 2: Select the Mirror Region option and hit enter. Here, you need to select the fastest mirror region for your location.
<img src="https://itsfoss.com/content/images/wordpress/2022/11/allocate-hard-disk-space-to-virtual-machine.png" alt="select the fastest replica region
If you have multiple entries, you can select each one by pressing the TAB key. When all mirrors are selected, press Enter.
Step 3: Select the Drive option from the main menu to configure the hard drive on which you are going to install Arch Linux. Within this menu, in case you find a list of drives, select the disk with the highest size (which will be our hard drive).
<img src="https://itsfoss.com/content/images/size/w600/wordpress/2022/11/allocate-hard-disk-space-to-virtual-machine.png" alt="Select the drive to install Arch Linux
Step 4: Format the drive and configure the file system.
You need to select the
Disk Layout option from the main menu and select the option as shown in the screenshot below:
<img src="https://itsfoss.com/content/images/wordpress/2022/11/arch-linux_virtual-machine-setup.png" alt="erase all selected drives and use default partition layout
default partition This will prompt us to select a file system. In this case, I used the BTRFS file system. So select your file system preference and press enter.
<img src="https://itsfoss.com/content/images/size/w600/wordpress/2022/11/arch-linux_virtual-machine-setup.png" alt="select file system for new arch linux system
This will ask you several yes/no questions about using BTRFS subvolumes with a default structure and BTRFS compression . Agree on the default value and press enter.
Step 5: You can skip creating a root password (this will disable the root, which is not a problem). But you must create a new user and give it sudo privileges. Go to the User accounts option and select Add a new user:<img src="https://itsfoss.com/content/images/wordpress/2022/11/virtualbox-booting-arch-linux.png" alt="add a new user and give them sudo privileges” />Add a new user and give them sudo
You can select the confirm and output option (if not seen, scroll down using the arrow down).
Step 6: In this step, you need to select the desktop environment. First select the Profile option. Here, select the desktop option as shown below:Select the desktop option
desktop environment This will list the available desktop environments. Choose your favorite desktop from the list. I used GNOME here.
<img src="https://itsfoss.com/content/images/wordpress/2022/11/type-archinstall-in-arch-linux-install-terminal.png" alt="Select the desktop environment of your choice
On the next screen, you need to select the graphics driver. For VirtualBox, select the VMware/VirtualBox driver.
Step 7: Now, you should select the following options from the following options
- Audio: The default is Pipewire
- Kernel : Use the default Linux kernel or you will have other options like LTS, Hardened, Zen, etc.
- Additional packages: Specify the additional packages you need, by name (such as firefox).
- Configuration: Use Network Manager
- Time zone: your location time
- Optional repositories: Testing/Multilib
Once done, this will be your configuration:
Step 8: Press the install button at the bottom. This will start the installation process. If you have a fast internet connection/system, the download and installation process takes 5-10 minutes.
After the installation is complete, it will ask you to convert it to a newly created installation for post-installation configuration, but we don’t need it. Therefore, select No to complete the installation.
Step 13: Finally, you should see the terminal window again. Type in:
This will safely exit the installation and shut down the virtual machine.
Everything is ready! Before starting the virtual machine with Arch installed, you need to do one more thing: delete the ISO disk selected as an optical drive. Similar to how you added the ISO to boot, you can target the virtual machine configuration and delete it as shown below:
it! You have finished installing Arch Linux on VirtualBox.
All you have to do is start the virtual machine, and this is what it looks like in my case:
Although it takes a bit of time to review the options, the new guided installer in Arch Linux saves a lot of time to get the essentials right.
The same set of steps applies to installing Arch Linux on your computer. You need to create 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 this is your first time installing it or you want to try it out, a virtual machine is the best way to experience it without interrupting your host computer.
I hope this helps you install Arch Linux on VirtualBox. Let me know your thoughts in the comments below.