Huzi Blogs
Blog
Blog
Disclaimer & Data Privacy Policy
Project by huzi.pk

© 2026 blogs.huzi.pk. All Rights Reserved.

    Back to all posts
    Linux

    The 2024 Guide to Installing Arch Linux

    By Huzi

    Arch Linux is a lightweight, flexible, and independently developed Linux distribution designed for experienced users who want a highly customized system. It follows a rolling-release model and adheres to the principles of simplicity, modernity, pragmatism, user centrality, and versatility. The famous Arch Wiki is one of the most comprehensive documentation sources in the entire open-source ecosystem.

    Unlike user-friendly installers like those for Ubuntu or Fedora, installing Arch Linux is a manual, command-line-driven process. This guide will walk you through the essential steps to get a functional Arch Linux system running in 2024.

    Disclaimer: This guide is for educational purposes. The Arch installation process can be complex. Always back up your data before partitioning drives.

    The Arch Way: Core Principles

    Before we begin, it's crucial to understand the philosophy behind Arch:

    1. Simplicity: Arch defines simplicity as "without unnecessary additions or modifications." It provides a minimal base system, allowing you to build upon it.
    2. User-Centrality: You, the user, are in control. The system will not make assumptions about your needs. You decide which desktop environment, software, and services to install.
    3. Rolling Release: Arch is continuously updated. A single pacman -Syu command brings your entire system to the latest version. No more major version upgrades.

    Step 0: Prerequisites

    • A computer with an x86-64 compatible architecture.
    • At least 512 MB of RAM (2 GB recommended for a graphical environment).
    • A USB drive with at least 2 GB of space.
    • An active internet connection.
    • Familiarity with the Linux command line.

    Step 1: Create a Bootable USB

    1. Download the ISO: Get the latest Arch Linux ISO from the official download page.
    2. Create the Bootable Drive: Use a tool like Rufus on Windows, or the dd command on Linux or macOS.

    On Linux: ```bash

    # Replace /dev/sdX with your USB device identifier (e.g., /dev/sdb)
    
    # Be extremely careful with this command!
    sudo dd if=/path/to/archlinux.iso of=/dev/sdX bs=4M status=progress oflag=sync
    ```
    

    Step 2: Boot into the Live Environment

    Insert the USB drive into your target machine and boot from it. You may need to change the boot order in your BIOS/UEFI settings. You will be greeted with a Zsh shell prompt.

    Step 3: Initial Setup

    1. Set Keyboard Layout (Optional): The default is US. To list other layouts:
      ls /usr/share/kbd/keymaps/**/*.map.gz
      

    To set a layout (e.g., for German): bash loadkeys de-latin1

    1. Verify Boot Mode: Check if you've booted in UEFI or BIOS mode.
      ls /sys/firmware/efi/efivars
      

    If the command shows a directory, you are in UEFI mode. If it reports "No such file or directory," you are in BIOS mode. This is crucial for partitioning.

    1. Connect to the Internet:
      • Ethernet: Should work automatically.
      • Wi-Fi: Use the interactive iwctl utility.
        iwctl
        
        # Inside iwctl prompt
        [iwd]# device list
        [iwd]# station <device_name> scan
        [iwd]# station <device_name> get-networks
        [iwd]# station <device_name> connect <SSID>
        
        # Enter password when prompted, then type 'exit'
        

    Test your connection: bash ping archlinux.org

    1. Update the System Clock:
      timedatectl set-ntp true
      

    Step 4: Partition the Disks

    This is the most critical step. We'll use cfdisk, a user-friendly partitioning tool.

    1. Identify your drive:
      lsblk
      

    Your main drive will likely be /dev/sda or /dev/nvme0n1.

    1. Run cfdisk:

      cfdisk /dev/sda
      
    2. Partition Scheme (Example for UEFI):

      • EFI System Partition (ESP): At least 512 MB. Choose EFI System as the type.
      • Swap Partition (Optional but recommended): Size depends on your RAM. A good rule of thumb is a size equal to your RAM. Choose Linux swap as the type.
      • Root Partition: The rest of the space. Choose Linux filesystem as the type.

    Select Write to save the changes, then Quit.

    Step 5: Format the Partitions

    1. Format the ESP (UEFI only):

      
      # Assuming /dev/sda1 is your ESP
      mkfs.fat -F32 /dev/sda1
      
    2. Format the Swap Partition:

      
      # Assuming /dev/sda2 is your swap
      mkswap /dev/sda2
      
    3. Format the Root Partition:

      
      # Assuming /dev/sda3 is your root
      mkfs.ext4 /dev/sda3
      

    Step 6: Mount the File Systems

    1. Mount the Root Partition:

      mount /dev/sda3 /mnt
      
    2. Create and Mount other partitions (UEFI):

      mkdir /mnt/efi
      mount /dev/sda1 /mnt/efi
      
    3. Enable Swap:

      swapon /dev/sda2
      

    Step 7: Install the Base System

    Use the pacstrap script to install the base packages, a Linux kernel, and common firmware.

    pacstrap /mnt base linux linux-firmware nano
    
    • base: The minimal set of packages for a functional system.
    • linux: The latest Linux kernel.
    • linux-firmware: Firmware files required by many devices.
    • nano: A simple text editor for configuration.

    Step 8: Configure the System

    1. Generate fstab: Create the file system table.

      genfstab -U /mnt >> /mnt/etc/fstab
      
    2. Chroot into the new system:

      arch-chroot /mnt
      

    From now on, commands are run inside your newly installed system.

    1. Set Time Zone:

      
      # Example for New York
      ln -sf /usr/share/zoneinfo/America/New_York /etc/localtime
      hwclock --systohc
      
    2. Localization:

      • Edit /etc/locale.gen and uncomment en_US.UTF-8 UTF-8 (and others you need).
        nano /etc/locale.gen
        
      • Generate the locales:
        locale-gen
        
      • Create /etc/locale.conf:
        echo "LANG=en_US.UTF-8" > /etc/locale.conf
        
    3. Network Configuration:

      • Set your hostname:
        echo "my-arch-box" > /etc/hostname
        
      • Add matching entries to /etc/hosts:
        nano /etc/hosts
        
        # Add the following lines:
        127.0.0.1   localhost
        ::1         localhost
        127.0.1.1   my-arch-box.localdomain   my-arch-box
        
    4. Set Root Password:

      passwd
      

    Enter a strong password for the root user.

    Step 9: Install a Boot Loader (GRUB)

    1. Install GRUB and other essentials:

      pacman -S grub efibootmgr networkmanager
      
      • grub: The boot loader.
      • efibootmgr: Required for UEFI systems.
      • networkmanager: For managing network connections after reboot.
    2. Install GRUB to the disk:

      grub-install --target=x86_64-efi --efi-directory=/efi --bootloader-id=GRUB
      
    3. Generate the GRUB configuration file:

      grub-mkconfig -o /boot/grub/grub.cfg
      

    Step 10: Final Steps

    1. Enable NetworkManager:

      systemctl enable NetworkManager
      
    2. Exit and Reboot:

      exit
      umount -R /mnt
      reboot
      

    Remove the installation USB drive.

    Post-Installation: Welcome to Your System!

    You now have a minimal, command-line Arch Linux system. From here, you can:

    • Create a user: useradd -m huzi, passwd huzi
    • Install sudo: pacman -S sudo, and add your user to the wheel group.
    • Install a Desktop Environment:
      
      # Install Xorg (the display server)
      sudo pacman -S xorg
      
      # Install a desktop environment like GNOME or KDE
      sudo pacman -S gnome
      sudo systemctl enable gdm # For GNOME
      
      # or
      sudo pacman -S plasma
      sudo systemctl enable sddm # For KDE
      reboot
      
    • Install a display manager like GDM (for GNOME) or SDDM (for KDE).

    Welcome to Arch Linux! You've built a system from the ground up, tailored

    Advertisements


    You Might Also Like

    Luxurious Heavy Embroidered Net Bridal Maxi 2026 | Handwork Bodice & Net Dupatta

    Luxurious Heavy Embroidered Net Bridal Maxi 2026 | Handwork Bodice & Net Dupatta

    PKR 7750

    Cultural Heavy Embroidered Lawn Suit 3-Pc | Embroidered Chiffon Dupatta (2025)

    Cultural Heavy Embroidered Lawn Suit 3-Pc | Embroidered Chiffon Dupatta (2025)

    PKR 4800

    Elegant Embroidered Swiss Lawn Dress 3-Pc | Digital Print Silk Dupatta (2024)

    Elegant Embroidered Swiss Lawn Dress 3-Pc | Digital Print Silk Dupatta (2024)

    PKR 4850

    Digital Print Lawn Dress 2024 (90/70 Quality) with Diamond Voil Dupatta

    Digital Print Lawn Dress 2024 (90/70 Quality) with Diamond Voil Dupatta

    PKR 3700

    Digital All-Over Print Lawn 3-Pc Suit with Printed Chiffon Dupatta | Casual Wear Pakistan

    Digital All-Over Print Lawn 3-Pc Suit with Printed Chiffon Dupatta | Casual Wear Pakistan

    PKR 3900

    Advertisements


    Related Posts

    Linux
    Customizing Your Linux Desktop Environment
    One of the greatest strengths of Linux is its customizability. Learn how to personalize your desktop environment, from changing themes and icons to using powerful tools like Conky and custom shell scripts.

    By Huzi

    Read More
    Linux
    Getting Started with Arch Linux: A Beginner's Guide
    Arch Linux is a lightweight and flexible Linux distribution that follows the 'Keep It Simple' principle. This guide will walk you through what Arch is, its philosophy, and the first steps to get it running.

    By Huzi

    Read More
    Linux
    Why Linux is a Great Operating System for Developers
    Linux is a powerful, open-source operating system that has become a favorite among developers. From its powerful command line to its package managers and customization options, find out why Linux is an ideal environment for programming.

    By Huzi

    Read More
    Gadgets
    Top 10 Mobile Phones with Fast Charging: Save Time During Load Shedding
    Load shedding? No problem. Discover the top 10 fastest charging phones in Pakistan that can save you during power cuts. This guide covers phones with 120W, 150W, and even 180W charging, helping you get hours of use from just a few minutes of charging.

    By Huzi

    Read More
    Real Estate
    Investing in Real Estate for First-Time Buyers in Islamabad (2025 Guide)
    Islamabad "" Pakistan ka sabse planned aur rapidly growing city "" har saal naye investors ko attract karta hai. Lekin agar tum pehli dafa real estate mai investment kar rahe ho, toh confusion natural hai.

    By Huzi

    Read More
    Gadgets
    Trending Smartphones & Gadgets in Pakistan (2025)
    A look at the hottest smartphones and gadgets in Pakistan for 2025, from flagship phones to essential tech accessories, plus tips for finding the best deals.

    By Huzi

    Read More