For testing, development, or container hosting, virtualized environments let you run Arch Linux inside Windows or macOS without modifying partition schemes. This guide explains how to install Arch in a Virtual Machine (VirtualBox/VMware) and Windows Subsystem for Linux (WSL2).
Virtual machines isolate the guest OS. Arch Linux installs identically in a VM, but requires some hardware settings adjustments and guest utilities to optimize graphical performance.
When creating a new Virtual Machine, use the following settings for the best experience:
- OS Type: Linux / Arch Linux (64-bit).
- System/Motherboard: Check Enable EFI (highly recommended; standard BIOS is legacy).
- RAM: At least 2 GB / 2048 MB (4 GB recommended if using a heavy desktop environment).
- CPU: Allocate at least 2 Cores (prevents high latency inside desktop interfaces).
- Display: Set video memory to 128 MB (maximum) and check Enable 3D Acceleration (crucial for smooth performance on modern UI shells).
Mount your downloaded Arch Linux standard ISO inside the virtual optical drive and boot. Follow the standard Windows/PC installation guide to partition, format, and pacstrap the system.
Once you boot into your freshly installed Arch Linux machine, you must install the specific VM integration drivers.
These drivers enable shared folder access, copy/paste clipboard sharing, and automatic screen resizing.
- Run this inside your Arch VM terminal:
sudo pacman -S virtualbox-guest-utils xf86-video-vmware
- Enable and start the background guest synchronization service:
sudo systemctl enable vboxservice.service sudo systemctl start vboxservice.service
These utilities manage mouse movement, screen scaling, and copy-paste.
- Run this inside your Arch VM:
sudo pacman -S open-vm-tools xf86-video-vmware xf86-input-vmmouse
- Enable and start the VM synchronization service:
sudo systemctl enable vmtoolsd.service sudo systemctl start vmtoolsd.service
Running Arch Linux natively in Windows with full systemd integration and high file-system speeds. We will use the popular, open-source ArchWSL wrapper project.
Ensure WSL2 is active on your Windows machine:
- Open PowerShell as Administrator and run:
wsl --install - Make sure you are using WSL2 as the default architecture version:
wsl --set-default-version 2
- Go to the ArchWSL GitHub Releases page and download the latest zip file (e.g.,
Arch2.zip). - Extract the contents of the zip file into a permanent directory on your drive (e.g.,
C:\WSL\Arch). Do not place it in temporary download directories. - Inside your extracted folder, locate
Arch.exe, right-click it, and select Run as administrator. - A console window will pop up and register the Arch distribution. This takes under a minute.
Once the registration completes, press any key to open the Arch command shell.
Since WSL images do not have a live boot entropy system, you must initialize keys manually:
pacman-key --init
pacman-key --populate archlinux
pacman -Sy archlinux-keyring
pacman -SyuCreate your primary user account, configure their shell, and give them administrator privileges.
# Add new user:
useradd -m -G wheel -s /bin/bash username
passwd username
# Set password for root:
passwd rootGive the new user access to sudo:
# Uncomment '%wheel ALL=(ALL:ALL) ALL' inside visudo
EDITOR=nano visudoExit the Arch console. Back in Windows PowerShell, navigate to your extraction folder and set the newly created user as the default login handle:
.\Arch.exe config --default-user usernameBy default, WSL does not launch systemd as system manager. Let's toggle it:
- Inside your ArchWSL terminal, create the WSL configuration file:
sudo nano /etc/wsl.conf
- Insert the following lines to enable systemd and auto-mount Windows drives:
[boot] systemd=true [automount] options = "metadata"
- Save and close the file.
- Back in Windows PowerShell, restart WSL to reload settings:
wsl --shutdown - Relaunch your Arch terminal. You can now use
systemctlto start database servers, Docker services, and local scripts!