How to Install Arch Linux: Step-by-Step Guide
4 min read
1 month ago
Published on May 17, 2025
This response is partially generated with the help of AI. It may contain inaccuracies.
Table of Contents
Introduction
This tutorial provides a comprehensive guide on installing Arch Linux, covering both the beginner-friendly archinstall
method and the manual installation for those seeking more control. Arch Linux is a rolling-release distribution known for its flexibility and customization options, making this guide essential for anyone looking to dive into the world of Arch.
Step 1: Download the ISO Image
- Go to the Arch Linux official website.
- Navigate to the downloads section.
- Download the latest Arch Linux ISO image.
Step 2: Prepare for Installation
- Ensure that you have a USB drive ready to create a bootable installation medium.
- Use tools like Rufus (for Windows) or
dd
(for Linux) to create the bootable USB from the ISO image.
Step 3: Boot from USB
- Insert the USB drive into your computer.
- Restart your machine and enter the BIOS/UEFI settings.
- Set the USB drive as the primary boot device.
- Save changes and exit BIOS/UEFI.
Step 4: Connect to WiFi
- Once the Arch Linux live environment loads, open a terminal.
- Use the following command to list available networks:
iwctl
- Connect to your WiFi network:
station device_name connect your_SSID
- Verify your connection:
ping -c 3 archlinux.org
Step 5: Enable SSH (Optional)
- To enable SSH for easier installation, run:
systemctl enable sshd systemctl start sshd
- This allows remote access to the installation.
Step 6: Install Arch Linux via the archinstall Method
- Start the installer by running:
archinstall
- Follow the on-screen prompts to customize your installation, including disk selection, user setup, and package selection.
Step 7: Manual Installation Method
- If you prefer more control, follow these steps to install Arch manually.
Step 7.1: Partition the Disk
- Use
fdisk
orcfdisk
to partition your disk. - Create at least two partitions: one for the root filesystem and one for swap.
Step 7.2: Format Partitions
- Format the root partition with ext4:
mkfs.ext4 /dev/sdX1
- Format the swap partition:
mkswap /dev/sdX2
Step 7.3: Set Up an Encrypted Partition (Optional)
- Use
cryptsetup
to create an encrypted partition:cryptsetup luksFormat /dev/sdX1
- Open the encrypted partition:
cryptsetup open /dev/sdX1 cryptroot
Step 7.4: Configure LVM (Optional)
- Install LVM tools:
pacman -S lvm2
- Create physical volumes, volume groups, and logical volumes as needed.
Step 8: Install Required Packages
- Mount the root partition:
mount /dev/sdX1 /mnt
- Install essential packages:
pacstrap /mnt base linux linux-firmware
Step 9: Generate fstab File
- Generate the fstab file using:
genfstab -U /mnt >> /mnt/etc/fstab
Step 10: Chroot into the Installation
- Change root into the new installation:
arch-chroot /mnt
Step 11: Set Up Users
- Create a new user and set their password:
useradd -m -G wheel username passwd username
Step 12: Install Additional Packages
- Install any additional packages you may need, such as:
pacman -S vim git
Step 13: Enable SSH
- Repeat the SSH enabling steps from earlier if you wish to use SSH.
Step 14: Install the Linux Kernel
- Ensure the Linux kernel is installed (already included in the
pacstrap
command).
Step 15: Install GPU Drivers
- For Nvidia users, install the drivers:
pacman -S nvidia
- For AMD or Intel, install the respective drivers.
Step 16: Generate Initial RAM Disk
- Generate the initial RAM disk:
mkinitcpio -P
Step 17: Configure Locale and GRUB
- Set the locale
- Edit
/etc/locale.gen
and uncomment your locale. - Run:
locale-gen
- Install GRUB:
pacman -S grub
- Install GRUB to the disk:
grub-install --target=i386-pc /dev/sdX
Conclusion
You've successfully installed Arch Linux! With both the archinstall
method for beginners and the manual method for advanced users, you now have a functioning Arch system. Explore additional packages and configurations to tailor your system to your needs. Happy computing!