Install Arch Linux

| Categories ArchLinux  | Tags ArchLinux  linux 

Install Arch Linux

Arch Linux is a distribution known for its simplicity, rolling-release model, and ultimate freedom. Installing Arch is a great opportunity to deeply understand Linux system internals. This guide, based on the ArchWiki Installation Guide, walks you through setting up a usable desktop with UEFI boot, iwd for Wi-Fi, PipeWire for audio, zsh, and the i3 window manager.

This article is based on the official 2025 Arch ISO and is suitable for both beginners and advanced users.


πŸ’Ώ 1. Create and Boot the Installation Media

sudo dd if=archlinux-xxx.iso of=/dev/sdX bs=4M status=progress && sync
  • Reboot and enter BIOS/UEFI:
    • Disable Secure Boot
    • Set USB as the first boot device
  • Select Arch Linux install medium to enter the Live environment (you’ll be logged in as root with zsh as default shell)

🌐 2. Connect to the Internet (Using iwd)

# Start iwd
iwd

Inside the iwd interactive shell:

station wlan0 scan
station wlan0 get-networks
station wlan0 connect your-ssid

Verify network connectivity:

ping archlinux.org

πŸ’½ 3. Disk Partitioning (GPT + EFI Example)

cfdisk /dev/nvme0n1
Partition Mount Point Type Size
/dev/nvme0n1p1 /boot EFI System 512M
/dev/nvme0n1p2 / ext4 Rest

Format and mount:

mkfs.fat -F32 /dev/nvme0n1p1
mkfs.ext4 /dev/nvme0n1p2

mount /dev/nvme0n1p2 /mnt
mount --mkdir /dev/nvme0n1p1 /mnt/boot

πŸ“¦ 4. Install the Base System

pacstrap -K /mnt base linux linux-firmware neovim git zsh iwd

Generate fstab:

genfstab -U /mnt >> /mnt/etc/fstab

Chroot into the new system:

arch-chroot /mnt

πŸ”§ 5. System Configuration

Set timezone and locale:

ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
hwclock --systohc

echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
locale-gen

echo "LANG=en_US.UTF-8" > /etc/locale.conf

Set hostname and hosts file:

echo arch > /etc/hostname

cat > /etc/hosts <<EOF
127.0.0.1   localhost
::1         localhost
127.0.1.1   arch.localdomain arch
EOF

Set root password:

passwd

🧭 6. Install the Bootloader (systemd-boot)

bootctl install

cat > /boot/loader/loader.conf <<EOF
default arch
timeout 3
editor 0
EOF

cat > /boot/loader/entries/arch.conf <<EOF
title   Arch Linux
linux   /vmlinuz-linux
initrd  /initramfs-linux.img
options root=PARTUUID=$(blkid -s PARTUUID -o value /dev/nvme0n1p2) rw
EOF

πŸ‘€ 7. Add a User with sudo Privileges

useradd -mG wheel yourname
passwd yourname
EDITOR=nvim visudo  # Uncomment '%wheel ALL=(ALL) ALL'

🌐 8. Enable Network Services (iwd)

systemctl enable iwd

🎯 9. Install yay and Essential Packages

pacman -S base-devel
cd /opt
git clone https://aur.archlinux.org/yay.git
chown -R yourname:yourname yay
su yourname
cd yay && makepkg -si

Recommended packages:

Package Purpose
neovim Text editor
git Version control
zsh + oh-my-zsh Enhanced shell experience
alacritty GPU-accelerated terminal
firefox Web browser
ranger Terminal file manager
btop System resource monitor
unzip / tar Archive utilities

πŸ–ΌοΈ 10. Install GUI with i3 Window Manager

Install X11 and i3:

pacman -S xorg-server xorg-xinit i3 dmenu picom feh alacritty

echo 'exec i3' > /home/yourname/.xinitrc
chown yourname:yourname /home/yourname/.xinitrc

Auto-start X (add to ~/.bash_profile):

[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec startx

πŸ”Š 11. Install PipeWire Audio System

pacman -S pipewire wireplumber pipewire-audio pipewire-alsa pipewire-pulse
systemctl --user enable --now pipewire pipewire-pulse

🎨 12. Install Polybar and Integrate with i3

pacman -S polybar
cd ~
git clone --depth=1 https://github.com/adi1090x/polybar-themes.git
cd polybar-themes
chmod +x setup.sh
./setup.sh
# Choose "hack" theme

Edit i3 config (~/.config/i3/config) to launch Polybar:

exec --no-startup-id ~/.config/polybar/hack/launch.sh

πŸ’» 13. Install zsh + oh-my-zsh

pacman -S zsh
chsh -s /bin/zsh yourname

# Install oh-my-zsh
su - yourname
git clone https://github.com/ohmyzsh/ohmyzsh.git ~/.oh-my-zsh
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc

Recommended plugins: zsh-autosuggestions, zsh-syntax-highlighting (available via yay):

yay -S zsh-autosuggestions zsh-syntax-highlighting

Add to ~/.zshrc:

source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh

βœ… Summary

Installing Arch Linux is a journey to mastering your system. This guide combines official instructions and practical steps to help you build a clean, fast, beautiful, and minimal desktop.

You’ll get:

  • A clean and free system environment
  • Minimalist i3 desktop with Polybar
  • A full terminal workflow + shell customization
  • A deeper understanding of Linux boot and system config

πŸ“š Further Reading