sodcalculator

10 Tech How-To

Install Arch Linux: Step-by-Step Guide

Guide 10-29663 · Updated · Step by step

To install Arch Linux, you boot the official ISO image, partition your disk, format the partitions, mount them, install the base system with pacstrap, configure the system (fstab, locale, network, initramfs, root password), and then reboot. The process is entirely command-line driven and typically takes 30–60 minutes for someone comfortable with the terminal.

What You Need Before Starting

Arch Linux is a rolling-release distribution aimed at users who want full control over their system. You should have:

  • A 64-bit x86_64 computer (ARM versions exist but are separate projects).
  • At least 2 GB of RAM (more for desktop environments).
  • At least 20 GB of free disk space (SSD recommended).
  • A stable internet connection via Ethernet (Wi-Fi is possible but requires extra steps during installation).
  • Another computer or phone to look up documentation if you get stuck.

You also need to download the official ISO from archlinux.org and write it to a USB drive using tools like dd (Linux/macOS) or Rufus (Windows). Verify the checksum before booting to avoid a corrupted image.

Booting the Installation Media

Insert the USB drive and reboot. Enter the boot menu (usually by pressing F12, F2, or Esc during startup) and select the USB drive. You will see the Arch boot menu; choose Boot Arch Linux (x86_64). The system will load into a root shell with no graphical interface.

If you are using Wi-Fi, run iwctl to connect before proceeding. For Ethernet, the connection is usually automatic. Test with ping archlinux.org. If you have a laptop with a hardware switch for Wi-Fi, make sure it is enabled.

Partitioning the Disk

Partitioning is one of the most critical steps. You need to decide on a partitioning scheme. The most common is GPT with a bootloader like GRUB. For UEFI systems (most modern computers), you need an EFI system partition (ESP) of at least 300 MB (recommended 512 MB) formatted as FAT32. For legacy BIOS, you need a BIOS boot partition (1 MB) if using GRUB.

The rest of the disk can be a single root partition, or you can separate /home, /var, etc. A typical minimal layout:

  • EFI partition (if UEFI) – mount at /boot or /efi
  • Root partition (/) – ext4 or btrfs
  • Swap partition (optional but recommended if RAM is low)

Use fdisk or gdisk to create partitions. For example, to create a GPT layout on /dev/sda:

  1. Run fdisk /dev/sda.
  2. Type g to create a new GPT label.
  3. Create a new partition with n, choose default number, and set size +512M for EFI.
  4. Change type to EFI System with t and code 1.
  5. Create another partition for root with remaining space.
  6. Write changes with w.

After partitioning, format them: mkfs.fat -F32 /dev/sda1 for EFI, mkfs.ext4 /dev/sda2 for root. If you created swap, use mkswap /dev/sda3 and swapon.

Mounting and Installing the Base System

Mount the root partition to /mnt and the EFI partition to /mnt/boot (or /mnt/efi). For example:

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

Now use pacstrap to install the base packages:

pacstrap -K /mnt base linux linux-firmware

This installs the Linux kernel, firmware, and basic tools. You may also want base-devel for building packages from the AUR, and a text editor like vim or nano. Add them to the command if desired.

Configuring the System

Generate the fstab file, which defines how partitions are mounted at boot:

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

Then chroot into the new system:

arch-chroot /mnt

Inside the chroot, set the time zone:

ln -sf /usr/share/zoneinfo/Region/City /etc/localtime
hwclock --systohc

Replace Region/City with your actual timezone, e.g., America/New_York.

Set the locale by uncommenting your language in /etc/locale.gen (e.g., en_US.UTF-8), then run locale-gen and create /etc/locale.conf with the same value.

Set the hostname in /etc/hostname and add a matching entry to /etc/hosts. Then set the root password with passwd.

Installing a Bootloader

The bootloader is essential for starting the system. For UEFI, install GRUB and the efibootmgr package:

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

For legacy BIOS, use grub-install --target=i386-pc /dev/sda (replace sda with your disk). If you prefer a simpler option, you can use systemd-boot for UEFI, which requires manual configuration but is lighter.

Rebooting and Post-Installation

Exit the chroot (exit), unmount all partitions (umount -R /mnt), and reboot (reboot). Remove the USB drive when prompted. You should see the GRUB menu and then boot into your new Arch system.

After logging in as root, create a regular user with useradd -m username and set a password. Install sudo (pacman -S sudo) and add the user to the wheel group with visudo to allow administrative commands.

To have a graphical interface, install a desktop environment (e.g., GNOME, KDE, XFCE) and a display manager. For example, pacman -S gnome gdm then enable gdm with systemctl enable gdm. You will also need to install a network manager like NetworkManager (pacman -S networkmanager and systemctl enable NetworkManager) to manage connections.

Common Problems and Solutions

Many installation issues stem from simple mistakes:

  • No internet after boot: If you relied on Ethernet during install, ensure the interface is up. For Wi-Fi, install iwd or NetworkManager and connect.
  • GRUB not found: Make sure the EFI partition is mounted correctly before running grub-install. Also verify that your motherboard is in UEFI mode, not legacy.
  • Cannot boot into system: Check fstab for errors, especially the UUIDs. You can edit the kernel parameters at the GRUB menu to debug.
  • Missing firmware: Some hardware (like Wi-Fi cards) needs extra firmware packages. Install linux-firmware if you didn’t, and check dmesg for errors.

Always consult the official Arch Wiki for detailed troubleshooting—it is one of the best resources in the Linux world.

Frequently Asked Questions

Is Arch Linux hard to install? Yes, it requires manual configuration and a basic understanding of Linux commands. If you are a beginner, consider following the official guide step-by-step or using an archinstall script (available on the ISO) for a semi-automated setup.

Can I install Arch on a Mac? Yes, but you may need to handle Apple’s firmware quirks. The process is similar, but you must use the appropriate bootloader and possibly install additional drivers for keyboard/trackpad.

How long does installation take? The base install takes about 30 minutes if you are familiar with the steps. Adding a desktop environment and configuring everything can take another hour or two.

What is the difference between Arch and Ubuntu? Arch is a rolling release with minimal pre-installed software, giving you full control. Ubuntu is a fixed release with a graphical installer and many defaults, making it easier for beginners.

Do I need to compile anything? No, Arch uses binary packages via pacman. You only compile if you want to use AUR packages or build from source.

Can I dual boot with Windows? Yes, but you must create a separate partition for Arch and ensure the bootloader recognizes Windows. It is recommended to install Windows first, then Arch, and let GRUB detect the existing OS.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →