1 - Download & verify ISO
Download the latest ISO from archlinux.org. Verify it with the official checksum.
sha256sum archlinux-2025.05.01-x86_64.iso
Tip: Ensure the hash matches the one published on the website.
2 - Create installer USB
On Linux, find your device with lsblk and write the ISO with dd. On Windows, use Rufus.
Linux
lsblk
sudo dd if=archlinux-2025.05.01-x86_64.iso of=/dev/sdX status=progress bs=4M conv=fsync
Replace /dev/sdX with your installer USB device.
Warning: Make sure that your USB drives do not contain any important data.
Windows
Use Rufus to write the ISO to your USB drive.
3 - Connect to the Internet
Now plug in both USBs — the media installer and the USB drive where we’ll install Arch Linux.
This next step is only necessary if you are using a Wi-Fi connection. If you are using Ethernet, you can skip it.
Let’s connect to the internet using iwctl:
- Detect any Wi-Fi adapters:
- Scan for nearby networks:
- List available networks:
- Connect to your Wi-Fi:
- Test your connection:
iwctl device list
You should see a wireless interface (e.g., wlan0 or similar).
iwctl station wlan0 scan
iwctl station wlan0 get-networks
iwctl station wlan0 connect SSID
Replace SSID with your Wi-Fi network name, press ENTER, and type your passphrase.
ping -c3 archlinux.org
4 - Partition target USB
Create three partitions on the target USB:
| # | Purpose | Size | Type / FS | Mount |
|---|---|---|---|---|
| 1 | BIOS boot | 128 MiB | ext2 | — |
| 2 | UEFI system | 512 MiB | vfat (FAT32) | /boot |
| 3 | Root | Rest | LUKS2 → Btrfs | / |
cfdisk /dev/sdY
Warning: Double‑check the target device (e.g. /dev/sdY) with lsblk to avoid wiping the wrong disk.
5 - Create Filesystems & Setup LUKS Encryption
Now that the partitions are ready, we need to format them with appropriate filesystems and optionally set up encryption for sensitive data.
mkfs.ext2 /dev/sdY1Formats the first partition (
/dev/sdY1) with the EXT2 filesystem.
mkfs.vfat -F32 /dev/sdY2Formats the second partition (
/dev/sdY2) as FAT32. This is typically used for EFI System Partitions.
cryptsetup luksFormat --type luks2 /dev/sdY3Initializes LUKS2 encryption on the third partition (
/dev/sdY3). Type YES in uppercase to confirm, then type a strong passphrase.
cryptsetup luksOpen /dev/sdY3 cryptrootOpens the LUKS-encrypted partition and maps it to
/dev/mapper/cryptroot. To interact with the partition as if it were unencrypted.
mkfs.btrfs /dev/mapper/cryptrootFormats the decrypted partition with the Btrfs filesystem.
6 - Create Btrfs Subvolumes
Next, we set up Btrfs subvolumes to separate the root filesystem and user data and mount the filesystem.
mount /dev/mapper/cryptroot /mntMounts the decrypted Btrfs partition to
/mnttemporarily so we can create subvolumes.
btrfs subvolume create /mnt/@Creates the root subvolume
@. This will hold the main system files.
btrfs subvolume create /mnt/@homeCreates the home subvolume
@homefor user data. Keeping it separate makes snapshots safer and easier.
umount /mntUnmounts the partition to remount it with the subvolumes as the active filesystem roots.
mount -o relatime,compress=zstd:3,subvol=@ /dev/mapper/cryptroot /mntRemounts the root subvolume
@with options:relatimefor efficient access times andcompress=zstd:3for transparent compression.
mkdir -vp /mnt/{boot,home}Creates the
/bootand/homedirectories inside/mntto mount the corresponding partitions or subvolumes.
mount -o relatime,compress=zstd:3,subvol=@home /dev/mapper/cryptroot /mnt/homeMounts the
@homesubvolume at/mnt/homewith the same options as the root subvolume.
mount /dev/sdY2 /mnt/bootMounts the EFI system partition at
/mnt/boot.
lsblk -pf /dev/sdYLists the partitions, filesystems, and mount points to verify everything is set up correctly.
7 - Install Base System
pacstrap -K /mnt linux-lts linux-firmware linux-lts-headers base base-devel nano \
btrfs-progs networkmanager grub efibootmgr dosfstools os-prober mtools \
bash-completion iwd usbutils intel-ucode amd-ucode
- linux-lts – Long-Term Support kernel, stable and maintained for longer periods.
- linux-firmware – Firmware files for various hardware devices.
- linux-lts-headers – Kernel headers for building modules against the LTS kernel.
- base – Essential packages for a minimal Arch Linux system.
- base-devel – Development tools for compiling software (make, gcc, etc.).
- nano – Simple terminal text editor.
- btrfs-progs – Tools for managing Btrfs filesystems.
- networkmanager – Network management daemon and CLI tools.
- grub – Bootloader to start the OS.
- efibootmgr – EFI boot manager to configure UEFI boot entries.
- dosfstools – Tools for creating and checking FAT filesystems.
- os-prober – Detects other OS installations for bootloader configuration.
- mtools – Utilities to access FAT filesystems without mounting them.
- bash-completion – Bash completions for core commands.
- iwd – Wireless daemon for managing Wi-Fi connections.
- usbutils – Utilities to list and query USB devices.
- intel-ucode – Microcode updates for Intel CPUs.
- amd-ucode – Microcode updates for AMD CPUs.
8 - Generate fstab
genfstab -U /mnt > /mnt/etc/fstab
genfstab – Generates the fstab file using UUIDs (-U) for all mounted partitions under /mnt, and writes it to /mnt/etc/fstab. This file tells the system which partitions to mount at boot.
9 - System Configuration
arch-chroot /mntEnters the new system environment at
/mnt, so all following commands affect the installed system, not the live USB.
echo "zombie" > /etc/hostnameSets the system name to
zombie, Change it to your own hostname, which identifies your computer on networks.
ln -sf /usr/share/zoneinfo/Japan/Tokyo /etc/localtimeLinks your local timezone file to
/etc/localtimefor correct system time. Set it to your own localtime
hwclock --systohchwclock – Writes the system time to the hardware clock so it stays accurate after reboots.
echo "en_US.UTF-8 UTF-8" | tee -a /etc/locale.genEnables the
en_US.UTF-8locale for system-wide use.
locale-genlocale-gen – Generates the locale files specified in
/etc/locale.gen.
echo "LANG=en_US.UTF-8" > /etc/locale.confSets the default system language environment variable.
echo "KEYMAP=us" > /etc/vconsole.confAdd your own keymap.
passwdPrompts to set a strong password for the root account.
auser=yourusernameDefines the username you will create.
useradd -mG wheel "$auser"Creates the user with a home directory and adds them to the
wheelgroup for administrative privileges.
passwd "$auser"Sets the password for your new user account.
EDITOR=nano visudoEdits the
sudoersfile safely. This allows users in thewheelgroup to usesudofor administrative tasks. Uncomment the line at the bottom of the file by removing the # from: %wheel ALL=(ALL) ALL
10 - GRUB + Encryption
nano /etc/default/grubnano – Opens the GRUB configuration file for editing. This file controls bootloader settings and kernel parameters.
GRUB_ENABLE_CRYPTODISK=y # Uncomment the line by removing the hashtag (#), then save and exit the fileThis enables GRUB to recognize LUKS-encrypted partitions at boot, allowing you to enter the passphrase early.
cryptsetup luksUUID /dev/sdY3Outputs the unique identifier of your LUKS encrypted partition. It tells GRUB which partition to unlock.
UUID=$(cryptsetup luksUUID /dev/sdY3) sed -i "s|^GRUB_CMDLINE_LINUX=.*|GRUB_CMDLINE_LINUX=\"cryptdevice=UUID=$UUID:root rootfstype=btrfs\"|" /etc/default/grubThis two-line command retrieves the LUKS UUID automatically and updates the GRUB configuration safely, avoiding manual copy/paste.
Warning: A single wrong character can make the system unbootable. Double‑check the UUID and syntax before updating GRUB.
11 - mkinitcpio
nano /etc/mkinitcpio.confnano – Opens the configuration file where you define which modules and hooks are included in the initramfs.
MODULES=(btrfs usb_storage usbhid xhci_pci ehci_pci)Here, Btrfs support, USB storage, USB keyboard, and USB controllers are included for proper hardware initialization.
HOOKS=(base udev keyboard autodetect microcode modconf kms keymap consolefont block encrypt filesystems fsck)HOOKS – Define the sequence of operations during boot. Important points: -
keyboardbeforeautodetectensures the keyboard works for password entry. -encryptbeforefilesystemsensures encrypted volumes are unlocked before mounting.
mkinitcpio -PRebuilds all preset initramfs images using the updated configuration, so the system boots with proper modules and hooks.
12 - Install GRUB
UEFI
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB --removable --recheckgrub-install – Installs GRUB for UEFI systems. -
--efi-directory=/bootspecifies the EFI system partition. ---bootloader-id=GRUBnames the boot entry. ---removablemakes it bootable on removable media. ---recheckensures device detection is refreshed.
Legacy BIOS
grub-install --target=i386-pc --boot-directory=/boot /dev/sdYgrub-install – Installs GRUB for BIOS systems. -
--boot-directory=/bootspecifies where GRUB files go. - Replace/dev/sdYwith your actual target disk.
Warning: Make sure to install for both UEFI and Legacy modes to ensure the USB boots on both.
Generate GRUB configuration
grub-mkconfig -o /boot/grub/grub.cfggrub-mkconfig – Automatically generates the GRUB configuration file, detecting all kernels and operating systems.
Warning: Make sure to replace sdY with your actual device. Installing GRUB to the wrong device can prevent your system from booting.
13 - Networking, Hosts, and DNS
systemctl enable systemd-networkdsystemd-networkd – Enables the systemd network service at boot, which manages network interfaces automatically.
systemctl enable systemd-resolvedProvides DNS resolution and caching for the system, required for hostname lookups and internet connectivity.
systemctl enable NetworkManagerNetworkManager – A higher-level tool to manage wired, wireless, and VPN connections with CLI or GUI tools.
host=$(cat /etc/hostname) sh -c "printf '127.0.0.1 localhost\n::1 localhost\n127.0.1.1 $host.localdomain $host\n' > /etc/hosts"Maps hostnames to IP addresses locally. This ensures your system can resolve its own hostname and loopback addresses without querying DNS.
sh -c 'printf "nameserver 8.8.8.8\nnameserver 1.1.1.1\n" >> /etc/resolv.conf'/etc/resolv.conf – Adds public DNS servers (Google and Cloudflare) for name resolution. To ensures the system can resolve domain names on the internet.
14 - Desktop Environment (optional)
pacman -S xfce4 xfce4-goodies lightdm lightdm-gtk-greeter network-manager-applet \
bluez bluez-utils wget curl git xdg-utils gvfs openssh alsa-utils \
pipewire pipewire-pulse pavucontrol wireplumber unzip ntfs-3g rsync \
noto-fonts-emoji noto-fonts-cjk noto-fonts-extra chromium arch-install-scripts gparted
- xfce4 – XFCE desktop environment.
- xfce4-goodies – Additional XFCE plugins and tools.
- lightdm – Display manager for graphical login.
- lightdm-gtk-greeter – GTK-based login screen for LightDM.
- network-manager-applet – GUI for managing network connections.
- bluez – Bluetooth protocol stack.
- bluez-utils – Bluetooth utilities for managing devices.
- wget – Command-line file downloader.
- curl – Command-line tool for transferring data with URLs.
- git – Version control system.
- neofetch – Displays system information in terminal.
- xdg-utils – Desktop integration utilities.
- gvfs – Virtual filesystem support for desktop apps.
- openssh – SSH client and server.
- alsa-utils – ALSA audio utilities.
- pipewire – Multimedia server for audio/video.
- pipewire-pulse – PulseAudio compatibility layer for PipeWire.
- pavucontrol – GUI volume control for PulseAudio/PipeWire.
- wireplumber – PipeWire session manager.
- unzip – Extract ZIP archives.
- ntfs-3g – NTFS filesystem support.
- rsync – File synchronization tool.
- noto-fonts – Much-needed fonts to include extra characters for different languages.
- arch-install-scripts – Scripts to aid in installing Arch Linux on other systems
- gparted – A Partition Magic clone
These packages install XFCE, essential utilities, audio/video support, network management, Bluetooth, and common CLI tools for daily usage.
systemctl enable lightdmsystemctl enable lightdm – Starts the display manager automatically at boot, providing a login screen.
systemctl enable bluetoothsystemctl enable bluetooth – Starts the Bluetooth service automatically at boot for device pairing and management.
15 - Finish
exitexit – Leaves the chroot environment, returning to the live installer system.
umount -R /mntRecursively unmounts all partitions mounted under
/mnt, ensuring no filesystems are left mounted before shutdown.
poweroffShuts down the installer system safely. After this, you can remove the installation media and boot your new system.
Warning: Remove the installer USB. Keep the target USB plugged in and boot from it. You should see the GRUB menu, then be prompted for your LUKS passphrase.
16 - Post Installation
Let's set up YAY, the AUR helper.
cd /tmp/ && git clone https://aur.archlinux.org/yaycd yay/ && makepkgs -si --noconfirm
And now you can just use yay instead of pacman.
yay -Syuyay -S fastfetchfastfetch
Et voilà! You now have a portable, encrypted Arch Linux on USB.