How to install Arch Linux (Step by Step)
Published: December 19, 2024
In this guide, you will learn how to install Arch Linux from scratch, with detailed steps and commands.
1. Prepare Your System
• Prepair USB Flash Drive
- First, download the latest Arch Linux ISO from the official Arch Linux website. Create a bootable USB using a tool like Rufus or Etcher.
• Boot into the Arch Linux Installer
- Restart your computer and boot from the USB drive. Select the Arch Linux ISO to start the installation process.
2. System Configuration
• Check Internet Connection
- Ensure you are connected to the internet. Use the following command:
ping -c 3 archlinux.org
• Update System Clock
- Synchronize the system clock:
timedatectl set-ntp true
• Partition Your Disk
- Use
fdisk
orcfdisk
to partition your disk. For example:
fdisk /dev/sda
• EFI partition (e.g., /dev/sda1)
• Root partition (e.g., /dev/sda2)
• Format and Mount Partitions
- Format the partitions:
mkfs.fat -F32 /dev/sda1
mkfs.ext4 /dev/sda2
mount /dev/sda2 /mnt
mkdir /mnt/boot
mount /dev/sda1 /mnt/boot
• Install the Base System
- Install the base packages:
pacstrap /mnt base linux linux-firmware
• Configure the System
- Generate the filesystem table:
genfstab -U /mnt >> /mnt/etc/fstab
arch-chroot /mnt
• Set Up Localization
- Edit the locale configuration:
echo "en_US.UTF-8 UTF-8" > /etc/locale.gen
locale-gen
echo "LANG=en_US.UTF-8" > /etc/locale.conf
3. Install Bootloader
• Install GRUB
- Install GRUB bootloader::
pacman -S grub efibootmgr
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB
grub-mkconfig -o /boot/grub/grub.cfg
3. Finish installation
• Exit and Reboot
- Exit the chroot environment:
exit
umount -R /mnt
reboot
• Conclusion
- Your Arch Linux system is now installed! You can continue with further configuration, such as installing a desktop environment or additional tools.