Loading blogs…
Arch Linux5 min read
Install Arch Linux on a UEFI machine step by step — partitioning, pacstrap, bootloader, networking and your first user — with every command explained.
Full-stack engineer, New Delhi
Installing Arch the manual way is the fastest way to actually understand how a Linux system fits together. It looks intimidating, but it's really just a dozen small steps done in order. This guide walks through a clean install on a modern UEFI laptop or desktop with a single disk.
Short on time? The official
archinstallscript does all of this through a menu. Read this guide once anyway — when something breaks later, you'll know exactly where to look.
You'll need:
Write the ISO to the USB. On Linux or macOS:
# find your USB device first with lsblk — double-check, this erases it
sudo dd if=archlinux-x86_64.iso of=/dev/sdX bs=4M status=progress oflag=syncOn Windows, use Rufus (DD mode) or balenaEtcher. Then boot from the USB with Secure Boot disabled in your firmware settings.
Confirm you booted in UEFI mode — this command should print 64:
cat /sys/firmware/efi/fw_platform_sizeEthernet usually just works. For Wi-Fi, use iwctl:
iwctl
[iwd]# device list
[iwd]# station wlan0 scan
[iwd]# station wlan0 get-networks
[iwd]# station wlan0 connect "Your-Network"
[iwd]# exit
ping -c 3 archlinux.org
timedatectl set-ntp trueFind your disk name with lsblk — usually /dev/nvme0n1 for NVMe or /dev/sda for SATA. We'll make two partitions: a 1 GiB EFI partition and one big root partition.
cfdisk /dev/nvme0n1Choose gpt, then create:
| Partition | Size | Type |
|---|---|---|
| /dev/nvme0n1p1 | 1G | EFI System |
| /dev/nvme0n1p2 | rest of disk | Linux filesystem |
Skip a swap partition — we'll use zram, which is faster and doesn't waste disk.
mkfs.fat -F 32 /dev/nvme0n1p1
mkfs.ext4 /dev/nvme0n1p2
mount /dev/nvme0n1p2 /mnt
mount --mkdir /dev/nvme0n1p1 /mnt/bootPrefer snapshots you can roll back to? Use Btrfs instead of ext4 — see my guide on keeping Arch stable with Btrfs snapshots.
Pick fast mirrors first, then install the essentials. Swap intel-ucode for amd-ucode if you have an AMD CPU.
reflector --country India --latest 10 --sort rate --save /etc/pacman.d/mirrorlist
pacstrap -K /mnt base linux linux-firmware intel-ucode \
networkmanager sudo nano vim man-db git base-develGenerate the filesystem table so the system knows what to mount at boot:
genfstab -U /mnt >> /mnt/etc/fstabStep inside it with arch-chroot:
arch-chroot /mnt
# time zone and clock
ln -sf /usr/share/zoneinfo/Asia/Kolkata /etc/localtime
hwclock --systohc
# locale: uncomment en_US.UTF-8 UTF-8 (and en_IN if you like)
nano /etc/locale.gen
locale-gen
echo "LANG=en_US.UTF-8" > /etc/locale.conf
# hostname
echo "archbox" > /etc/hostname
# root password
passwdOn UEFI, systemd-boot is the simplest option — it's already part of systemd.
bootctl installCreate the boot entry. blkid gives you the root partition's UUID:
blkid -s UUID -o value /dev/nvme0n1p2# /boot/loader/entries/arch.conf
title Arch Linux
linux /vmlinuz-linux
initrd /intel-ucode.img
initrd /initramfs-linux.img
options root=UUID=your-uuid-here rw quiet# /boot/loader/loader.conf
default arch.conf
timeout 3systemctl enable NetworkManager
useradd -m -G wheel -s /bin/bash dhruv
passwd dhruv
# allow the wheel group to use sudo: uncomment "%wheel ALL=(ALL:ALL) ALL"
EDITOR=nano visudoexit
umount -R /mnt
rebootPull out the USB. You should land at a login prompt. Log in as your user and connect to Wi-Fi with nmtui.
A fresh Arch install is just a console. From here:
sudo pacman -S plasma-meta sddm or gnome gdm, then enable the display managersudo pacman -S zram-generatorpacman properly — see my pacman and AUR cheat sheetBoot the USB again, mount your partitions and arch-chroot /mnt — you're back inside your system with a working toolset. Nearly every "I broke my Arch" moment is fixable from there.
Arch Linux
Make Arch Linux dependable: Btrfs snapshots with Snapper and snap-pac, safe update habits, an LTS kernel fallback and arch-chroot recovery.
Linux
Run your app as a systemd service that restarts on crash, replace cron with systemd timers, and read logs with journalctl. Copy-paste unit files included.
Linux Desktop
An honest comparison of Hyprland, Sway and i3 — what tiling window managers are, who each suits, and a starter config to get going.