
Arch Linux is a popular Linux distribution for experienced users. It’s known for its rolling release model, which means you’re always using the latest software. However, Arch Linux can be more challenging to install and maintain than other distributions. This article will walk you through the process of installing Arch Linux, from preparation to first boot. Follow each section carefully to ensure a successful installation.
Prerequisites
Before beginning the installation, it is crucial to ensure that you have:
- A USB drive (minimum 4GB)
- Internet connection
- Basic knowledge of command line operations
- At least 512MB RAM (2GB recommended)
- 20GB+ free disk space
- Backed up important data
Creating Installation Media
- Download the latest ISO from archlinux.org
- Verify the ISO signature for security
- Create bootable USB using dd command:
sudo dd bs=4M if=/path/to/archlinux.iso of=/dev/sdx status=progress oflag=syncBoot Preparation
- Enter BIOS/UEFI settings
- Disable Secure Boot
- Set boot priority to USB
- Save and exit
What are the Initial Boot Steps?
- Boot from USB and select “Arch Linux install medium”
- Verify boot mode:
ls /sys/firmware/efi/efivarsInternet Connection
For wired connection:
ip link
dhcpcdFor wireless:
iwctl
station wlan0 scan
station wlan0 connect SSIDVerify connection:
ping archlinux.orgSystem Clock
Update the system clock:
timedatectl set-ntp trueDisk Partitioning
- List available disks:
lsblk- Create partitions (example using fdisk):
fdisk /dev/sdaFor UEFI systems:
- EFI System Partition (ESP): 512MB
- Root partition: Remaining space
- Swap partition (optional): Equal to RAM size
For Legacy BIOS:
- Root partition: Most of the disk
- Swap partition (optional)
- Format partitions:
# For EFI partition
mkfs.fat -F32 /dev/sda1# For root partitionmkfs.ext4 /dev/sda2
# For swapmkswap /dev/sda3
swapon /dev/sda3
Mounting Partitions
Mount root partition:
mount /dev/sda2 /mntFor UEFI systems, mount ESP:
mkdir /mnt/boot
mount /dev/sda1 /mnt/bootBase System Installation
Install essential packages:
pacstrap /mnt base linux linux-firmware base-develSystem Configuration
- Generate fstab:
genfstab -U /mnt >> /mnt/etc/fstab- Change root into the new system:
arch-chroot /mnt- Set timezone:
ln -sf /usr/share/zoneinfo/Region/City /etc/localtime
hwclock --systohc- Configure locale:
nano /etc/locale.gen
# Uncomment en_US.UTF-8 UTF-8
locale-gen
echo "LANG=en_US.UTF-8" > /etc/locale.conf- Set hostname:
echo "myhostname" > /etc/hostname- Configure hosts file:
nano /etc/hosts
# Add:
# 127.0.0.1 localhost
# ::1 localhost
# 127.0.1.1 myhostname.localdomain myhostnameBoot Loader Installation
For GRUB on UEFI systems:
pacman -S grub efibootmgr
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB
grub-mkconfig -o /boot/grub/grub.cfgFor GRUB on Legacy BIOS:
pacman -S grub
grub-install --target=i386-pc /dev/sda
grub-mkconfig -o /boot/grub/grub.cfgNetwork Configuration
- Install network manager:
pacman -S networkmanager
systemctl enable NetworkManagerUser Management
- Set root password:
passwd- Create user account:
useradd -m -G wheel username
passwd username- Configure sudo:
EDITOR=nano visudo
# Uncomment %wheel ALL=(ALL) ALLFinal Steps
- Exit chroot:
exit- Unmount partitions:
umount -R /mnt- Reboot:
rebootPost-Installation
After first boot:
- Install graphics drivers:
pacman -S xf86-video-amdgpu # For AMD
# or
pacman -S nvidia nvidia-utils # For NVIDIA- Install desktop environment (example with GNOME):
pacman -S xorg gnome
systemctl enable gdm- Install common applications:
pacman -S firefox terminal-emulator file-managerTroubleshooting Tips
- If bootloader fails to install, verify EFI variables are available
- For wireless issues, ensure firmware is installed
- Check logs with
journalctlfor error messages - Verify partition mounts with
lsblk
Maintenance Recommendations
- Regular system updates:
pacman -Syu- Clean package cache periodically:
pacman -Sc- Check system logs regularly:
journalctl -p 3 -xb



