How to Install Arch Linux

Arch Linux is a lightweight, flexible, and powerful Linux distribution favored by many experienced users for its simplicity and customization possibilities. This article will walk you through the process of installing Arch Linux on your computer.
1. Preparing for Installation:
Before you begin, ensure your system meets the minimum criteria:
– A supported 64-bit system architecture
– An established internet connection
– A USB flash drive with at least 2 GB of storage
Next, download the latest Arch Linux ISO from the official website: https://www.archlinux.org/download/
2. Creating a Bootable USB Flash Drive:
To create a bootable USB flash drive, use software like Rufus (Windows) or dd (Linux). Follow the instructions provided by the software to burn the ISO file onto the drive.
3. Booting Your Computer from the USB Flash Drive:
Insert your newly created bootable flash drive into your computer and restart it. Access your BIOS settings and select the option to boot from the USB drive.
4. Initiating Arch Linux Installation:
Once your computer boots successfully from the USB drive, you’ll be faced with an installation prompt. Connect to Wi-Fi using the ‘iwctl’ command if necessary.
5. Creating Partitions:
Use ‘fdisk’ or ‘lsblk’ commands to list all available disks and their partitions; then use ‘cfdisk’ to create new partitions for Arch Linux.
Recommended partition scheme:
– An EFI System Partition (ESP) of around 500 MB (for UEFI systems)
– A root partition of at least 20 GB in size
– Optional, but recommended: a swap partition of at least 2 GB size or equal to your RAM
6. Formatting Partitions:
Now, format these new partitions using appropriate file systems (e.g., FAT32 for EFI System Partition and ext4 for the root partition). You may also create and activate a swap partition at this stage.
7. Mounting Partitions:
Mount the root partition (‘/mnt’) and create a directory for the EFI System Partition (‘/mnt/boot’). Next, mount the ESP to ‘/mnt/boot.’
8. Installing Base System:
Use ‘pacstrap’ command to install base packages in /mnt directory:
`pacstrap /mnt base linux linux-firmware`
9. Configuring fstab:
Generate an ‘fstab’ file using the ‘genfstab’ command, so your system mounts these partitions at startup:
`genfstab -U /mnt >> /mnt/etc/fstab`
Verify proper entries in the generated file: `cat /mnt/etc/fstab`
10. Changing Root:
Chroot into your new installation by executing `arch-chroot /mnt`.
11. Localization:
Configure localization settings like timezone, localization profiles, keyboard layout, and hostname.
12. Creating User Account & Setting Root Password:
Create a new user account with administrative privileges using ‘useradd’ command. Set passwords for both root and your new user with ‘passwd.’
13. Installing Bootloader:
As the next step in how to install Arch Linux, install systemd-boot as the bootloader for UEFI systems using ‘bootctl install.’ Edit ‘loader.conf’ and add a new entry to it.
14. Finishing Up Installation:
Exit chroot by typing ‘exit’ and unmount all partitions with ‘umount -R /mnt’. Finally, reboot your system by typing `reboot`.
15. Post-Installation Configuration:
After rebooting, log in with your newly created user account. Update your system with `sudo pacman -Syu` and proceed with any desired software installations.
Congratulations! You have successfully installed Arch Linux.