How to Install Arch Linux on VirtualBox Complete Guide (Manual + Automated Method)

Arch Linux is known for its flexibility and control. But the installation process can feel intimidating, especially for beginners.

The good part? You have two ways to install it:

  • Automated (archinstall) → fast and beginner-friendly
  • Manual installation → full control and deeper learning

This guide covers both, step by step.



What You’ll Need

  • Arch Linux ISO (latest version recommended)
  • VirtualBox installed
  • At least 20 GB free disk space
  • Virtualization enabled in BIOS

Step 1: Create a Virtual Machine

Open VirtualBox → Click New

Fill in:

  • Name: Arch Linux
  • Type: Linux
  • Version: Arch Linux (64-bit)

Allocate:

  • RAM: 2–4 GB
  • CPU: 2 cores

Create Disk:

  • Type: VDI
  • Size: 20 GB

Step 2: Attach ISO and Boot

  • Go to Settings → Storage
  • Attach the Arch ISO
  • Start the VM

Select:

Arch Linux install medium (x86_64, UEFI)

You’ll now see a terminal.

Step 3: Choose Installation Method

At this point, you can choose:

Option A: Automated (archinstall)

Option B: Manual Installation

Method 1: Automated Install (archinstall)

This is the easiest method.

Run Installer

archinstall

If archinstall Not Found (Important Fix)

Sometimes you may see:

archinstall: command not found

Here’s how to fix it:

1. Check internet

ping -c 3 google.com

2. Install it manually

pacman -Sy archinstall

Then run again:

archinstall

3. Still not working?

You’re likely using an old ISO.
 Download the latest Arch ISO and try again.

Follow the Installer Menu

Inside the menu, configure:

  • Disk → select /dev/sda
  • Filesystem → ext4
  • Bootloader → GRUB
  • Profile → Desktop (optional)
  • Network → NetworkManager
  • User account → create username + password

Then choose Install.

Finish

Once installation completes:

  • Shutdown VM
  • Remove ISO
  • Start again

You’ll boot into your new Arch system.

Method 2: Manual Installation (Step-by-Step)

This is the traditional Arch way.

Step 4: Check Internet

ping -c 3 google.com

Step 5: Sync Time

timedatectl set-ntp true

Step 6: Partition Disk

lsblk
cfdisk /dev/sda

Inside:

  • Select GPT
  • Create:
  • 512M → EFI System
  • Rest → Linux filesystem

Step 7: Format Partitions

mkfs.fat -F32 /dev/sda1
mkfs.ext4 /dev/sda2

Step 8: Mount

mount /dev/sda2 /mnt
mkdir /mnt/boot
mount /dev/sda1 /mnt/boot

Step 9: Install Base System

pacstrap /mnt base linux linux-firmware nano

Step 10: Generate fstab

genfstab -U /mnt >> /mnt/etc/fstab

Step 11: Chroot

arch-chroot /mnt

Step 12: Set Timezone

ln -sf /usr/share/zoneinfo/Asia/Kolkata /etc/localtime
hwclock --systohc

Step 13: Localization

nano /etc/locale.gen

Uncomment:

en_US.UTF-8 UTF-8

Then:

locale-gen
echo "LANG=en_US.UTF-8" > /etc/locale.conf

Step 14: Hostname

echo "archvm" > /etc/hostname
nano /etc/hosts

Add:

127.0.0.1 localhost
::1 localhost
127.0.1.1 archvm.localdomain archvm

Step 15: Root Password

passwd

Step 16: Install GRUB

pacman -S grub efibootmgr
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB
grub-mkconfig -o /boot/grub/grub.cfg

Step 17: Network

pacman -S networkmanager
systemctl enable NetworkManager

Step 18: Reboot

exit
umount -R /mnt
reboot

Remove ISO before reboot.

Step 19: Login

  • Username: root
  • Password: (the one you set)

Optional: Create User

useradd -m -G wheel -s /bin/bash yourusername
passwd yourusername

Enable sudo:

pacman -S sudo
EDITOR=nano visudo

Uncomment:

%wheel ALL=(ALL) ALL

Optional: Install Desktop (XFCE)

pacman -S xfce4 xfce4-goodies lightdm lightdm-gtk-greeter
systemctl enable lightdm
reboot

Which Method Should You Use?

  • Go with archinstall if you want a quick setup
  • Go with manual install if you want to truly learn Arch

Final Thoughts

Arch Linux isn’t hard. It’s just detailed.

Using VirtualBox makes it safe to experiment, break things, and learn without damaging your main system. 

أحدث أقدم