Arch Linux Installation
Quick Reference
# Essential installation steps
1. Boot from USB
2. Connect to network (iwctl for WiFi)
3. Partition disk (fdisk/gdisk/cfdisk)
4. Format partitions
5. Mount and pacstrap
6. Generate fstab
7. arch-chroot
8. Configure system
9. Install bootloader
10. Reboot
Pre-Installation
Create Bootable USB
# Download ISO from archlinux.org
# Verify signature
gpg --keyserver-options auto-key-retrieve --verify archlinux-*.iso.sig
# Write to USB (Linux)
sudo dd bs=4M if=archlinux-*.iso of=/dev/sdX status=progress oflag=sync
# Or use ventoy
ventoy -i /dev/sdX
cp archlinux-*.iso /mnt/ventoy/
Network Configuration
WiFi with iwctl
# Enter iwctl shell
iwctl
# List devices
device list
# Scan for networks
station wlan0 scan
station wlan0 get-networks
# Connect
station wlan0 connect "NetworkName"
# Enter password when prompted
# Exit
exit
# Verify
ping archlinux.org
Disk Partitioning
Check Disks
# List all disks
lsblk
# Detailed disk info
fdisk -l
# NVMe drives typically: /dev/nvme0n1
# SATA drives typically: /dev/sda
Partition Schemes
Simple UEFI Layout
| Partition | Size | Type | Mount Point |
|---|---|---|---|
/dev/nvme0n1p1 |
512M-1G |
EFI System |
/boot |
/dev/nvme0n1p2 |
Remaining |
Linux filesystem |
/ |
Create Partitions with fdisk
fdisk /dev/nvme0n1
# Commands:
# g - Create new GPT table
# n - New partition
# t - Change partition type
# w - Write and exit
# Create GPT table
Command: g
# Create EFI partition (1GB)
Command: n
Partition number: 1
First sector: (default)
Last sector: +1G
Command: t
Partition type: 1 (EFI System)
# Create root partition (remaining space)
Command: n
Partition number: 2
First sector: (default)
Last sector: (default, uses remaining)
# Write changes
Command: w
Format Partitions
Standard ext4 Setup
# Format EFI partition
mkfs.fat -F32 /dev/nvme0n1p1
# Format root partition
mkfs.ext4 /dev/nvme0n1p2
# If swap partition exists
mkswap /dev/nvme0n1p3
Btrfs Setup (Recommended)
# Format EFI
mkfs.fat -F32 /dev/nvme0n1p1
# Format root with Btrfs
mkfs.btrfs /dev/nvme0n1p2
# Create subvolumes
mount /dev/nvme0n1p2 /mnt
btrfs subvolume create /mnt/@
btrfs subvolume create /mnt/@home
btrfs subvolume create /mnt/@var
btrfs subvolume create /mnt/@snapshots
umount /mnt
# Mount with subvolumes
mount -o noatime,compress=zstd,subvol=@ /dev/nvme0n1p2 /mnt
mkdir -p /mnt/{boot,home,var,.snapshots}
mount -o noatime,compress=zstd,subvol=@home /dev/nvme0n1p2 /mnt/home
mount -o noatime,compress=zstd,subvol=@var /dev/nvme0n1p2 /mnt/var
mount -o noatime,compress=zstd,subvol=@snapshots /dev/nvme0n1p2 /mnt/.snapshots
mount /dev/nvme0n1p1 /mnt/boot
Install Base System
Update Mirror List
# Use reflector for fastest mirrors
reflector --country US --age 12 --protocol https --sort rate --save /etc/pacman.d/mirrorlist
# Or manually edit
vim /etc/pacman.d/mirrorlist
Pacstrap Base System
# Minimal installation
pacstrap -K /mnt base linux linux-firmware
# Recommended installation
pacstrap -K /mnt \
base \
linux \
linux-firmware \
base-devel \
git \
neovim \
sudo \
networkmanager \
intel-ucode # Or amd-ucode for AMD
# For Btrfs
pacstrap -K /mnt btrfs-progs
# For WiFi (laptop)
pacstrap -K /mnt iwd wireless_tools wpa_supplicant
System Configuration
Time Zone
# Set timezone
ln -sf /usr/share/zoneinfo/America/New_York /etc/localtime
# Generate /etc/adjtime
hwclock --systohc
Localization
# Edit locale.gen
vim /etc/locale.gen
# Uncomment: en_US.UTF-8 UTF-8
# Generate locales
locale-gen
# Set system locale
echo "LANG=en_US.UTF-8" > /etc/locale.conf
# Set keyboard layout (if not US)
echo "KEYMAP=de-latin1" > /etc/vconsole.conf
Bootloader Installation
systemd-boot (Recommended for UEFI)
# Install bootloader
bootctl install
# Create loader config
cat > /boot/loader/loader.conf << 'EOF'
default arch.conf
timeout 3
console-mode max
editor no
EOF
# Create Arch entry
# Get root partition UUID
blkid -s UUID -o value /dev/nvme0n1p2
cat > /boot/loader/entries/arch.conf << 'EOF'
title Arch Linux
linux /vmlinuz-linux
initrd /intel-ucode.img
initrd /initramfs-linux.img
options root=UUID=YOUR-UUID-HERE rw quiet
EOF
# For AMD CPU, use amd-ucode.img instead
mkinitcpio Configuration
Finish Installation
Post-Reboot Checklist
# Login as user
# Connect to network (WiFi)
nmcli device wifi connect "NetworkName" password "password"
# Update system
sudo pacman -Syu
# Install AUR helper
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
# Enable multilib (32-bit support)
sudo vim /etc/pacman.conf
# Uncomment [multilib] section
sudo pacman -Syu
LUKS Encryption (Optional)
Create Encrypted Partition
# Create LUKS container
cryptsetup luksFormat /dev/nvme0n1p2
# Open container
cryptsetup open /dev/nvme0n1p2 cryptroot
# Format the opened container
mkfs.ext4 /dev/mapper/cryptroot
# Mount
mount /dev/mapper/cryptroot /mnt
Configure for Encryption
# Add encrypt hook to mkinitcpio
# /etc/mkinitcpio.conf
HOOKS=(base udev autodetect microcode modconf kms keyboard keymap consolefont block encrypt filesystems fsck)
mkinitcpio -P
# Update bootloader
# /boot/loader/entries/arch.conf
options cryptdevice=UUID=YOUR-LUKS-UUID:cryptroot root=/dev/mapper/cryptroot rw quiet
Dual Boot with Windows
Preserve Windows EFI
# Don't format the existing EFI partition!
# Mount existing Windows EFI
mount /dev/nvme0n1p1 /mnt/boot
# systemd-boot will detect Windows automatically
bootctl install
# Or with GRUB
pacman -S os-prober
# Enable os-prober in /etc/default/grub
GRUB_DISABLE_OS_PROBER=false
grub-mkconfig -o /boot/grub/grub.cfg
Troubleshooting
Boot Issues
# Boot from USB, mount system
mount /dev/nvme0n1p2 /mnt
mount /dev/nvme0n1p1 /mnt/boot
arch-chroot /mnt
# Rebuild initramfs
mkinitcpio -P
# Reinstall bootloader
bootctl install
Quick Install Script
For experienced users, a basic script:
#!/bin/bash
# DANGER: This will erase your disk!
# Customize variables before running
DISK=/dev/nvme0n1
HOSTNAME=archbox
USERNAME=user
TIMEZONE=America/New_York
# Partition
sgdisk -Z $DISK
sgdisk -n 1:0:+1G -t 1:ef00 $DISK
sgdisk -n 2:0:0 -t 2:8300 $DISK
# Format
mkfs.fat -F32 ${DISK}p1
mkfs.ext4 ${DISK}p2
# Mount
mount ${DISK}p2 /mnt
mkdir /mnt/boot
mount ${DISK}p1 /mnt/boot
# Install
pacstrap -K /mnt base linux linux-firmware base-devel git neovim sudo networkmanager intel-ucode
# Configure
genfstab -U /mnt >> /mnt/etc/fstab
arch-chroot /mnt /bin/bash << CHROOT
ln -sf /usr/share/zoneinfo/$TIMEZONE /etc/localtime
hwclock --systohc
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
locale-gen
echo "LANG=en_US.UTF-8" > /etc/locale.conf
echo "$HOSTNAME" > /etc/hostname
systemctl enable NetworkManager
bootctl install
CHROOT
echo "Installation complete. Configure user and bootloader entries manually."