- Published on
Arch Linux Installation
- Authors
- Name
- Zairyl Zafra
- @zrylzfra
Installing Arch Linux: A Step by Step Guide
Prerequisites
Before you begin, make sure you have:
- Downloaded the latest Arch Linux ISO from archlinux.org/download
- Created a bootable USB drive (using tools like Rufus, Etcher, or
dd) - Backed up any important data
- At least 20GB of free disk space
- A stable internet connection
Installation Steps
1. Boot into the Live Environment
Boot your system from the Arch Linux USB. You'll see a boot menu—select "Arch Linux install medium" and press Enter.
2. Verify Internet Connection
Check if you have internet connectivity:
ping -c 3 archlinux.org
If you're using WiFi, connect using iwctl:
iwctl
device list
station wlan0 scan
station wlan0 get-networks
station wlan0 connect "Your-Network-Name"
exit
3. Update System Clock
Ensure the system clock is accurate:
timedatectl set-ntp true
Verify the time:
timedatectl status
4. Partition the Disk
List all available disks:
fdisk -l
Identify your target disk (usually /dev/sda or /dev/nvme0n1 for NVMe drives).
Using fdisk:
fdisk /dev/sda
Or use cfdisk (recommended for beginners):
cfdisk /dev/sda
Recommended partition scheme for UEFI:
| Partition | Size | Type | Mount Point |
|---|---|---|---|
| /dev/sda1 | 512MB | EFI System | /boot/EFI |
| /dev/sda2 | 4-8GB | Linux swap | [SWAP] |
| /dev/sda3 | Remaining | Linux filesystem | / |
For BIOS/Legacy systems:
| Partition | Size | Type | Mount Point |
|---|---|---|---|
| /dev/sda1 | 4-8GB | Linux swap | [SWAP] |
| /dev/sda2 | Remaining | Linux filesystem | / |
When finished, select Write to save changes, then Quit.
5. Format the Partitions
For UEFI systems:
# Format EFI partition as FAT32
mkfs.fat -F32 /dev/sda1
# Create and enable swap
mkswap /dev/sda2
swapon /dev/sda2
# Format root partition as ext4
mkfs.ext4 /dev/sda3
For BIOS systems:
# Create and enable swap
mkswap /dev/sda1
swapon /dev/sda1
# Format root partition as ext4
mkfs.ext4 /dev/sda2
6. Mount the File Systems
For UEFI:
# Mount root partition
mount /dev/sda3 /mnt
# Create and mount EFI directory
mkdir -p /mnt/boot/EFI
mount /dev/sda1 /mnt/boot/EFI
For BIOS:
# Mount root partition
mount /dev/sda2 /mnt
7. Install Base System
Install essential packages:
pacstrap -K /mnt base linux linux-firmware
Optional but recommended packages to add:
pacstrap -K /mnt base linux linux-firmware base-devel networkmanager vim nano git
8. Generate fstab
Generate the filesystem table:
genfstab -U /mnt >> /mnt/etc/fstab
Verify it was created correctly:
cat /mnt/etc/fstab
9. Change Root into New System
arch-chroot /mnt
10. Set Time Zone
List available regions:
ls /usr/share/zoneinfo/
List cities in your region (example: Asia):
ls /usr/share/zoneinfo/Asia/
Set your timezone (replace with your location):
ln -sf /usr/share/zoneinfo/Asia/Manila /etc/localtime
Generate /etc/adjtime:
hwclock --systohc
11. Configure Localization
Edit /etc/locale.gen:
nano /etc/locale.gen
Uncomment your locale (example: en_US.UTF-8 UTF-8 and/or en_PH.UTF-8 UTF-8)
Generate the locales:
locale-gen
Create /etc/locale.conf:
echo "LANG=en_US.UTF-8" > /etc/locale.conf
12. Network Configuration
Create hostname file:
echo "myhostname" > /etc/hostname
Edit /etc/hosts:
nano /etc/hosts
Add the following:
127.0.0.1 localhost
::1 localhost
127.0.1.1 myhostname.localdomain myhostname
13. Set Root Password
passwd
Enter a strong password when prompted.
14. Create User Account
Add a new user (replace username with your desired username):
useradd -m -G wheel,audio,video,optical,storage -s /bin/bash username
Set password for the user:
passwd username
15. Configure Sudo
Install sudo if not already installed:
pacman -S sudo
Edit sudoers file:
EDITOR=nano visudo
Uncomment the line:
%wheel ALL=(ALL:ALL) ALL
Save and exit (Ctrl+X, then Y, then Enter).
16. Install Bootloader (GRUB)
Install GRUB and related packages:
For UEFI systems:
pacman -S grub efibootmgr dosfstools os-prober mtools
Install GRUB to the EFI partition:
grub-install --target=x86_64-efi --bootloader-id=GRUB --efi-directory=/boot/EFI --recheck
For BIOS systems:
pacman -S grub os-prober
Install GRUB to the disk (not partition):
grub-install --target=i386-pc /dev/sda
Generate GRUB configuration (both systems):
grub-mkconfig -o /boot/grub/grub.cfg
17. Enable Network Manager
systemctl enable NetworkManager
18. Exit and Reboot
Exit the chroot environment:
exit
Unmount all partitions:
umount -R /mnt
Reboot the system:
reboot
Remove the installation media when prompted.
Post-Installation
Installing a Desktop Environment
After rebooting and logging in, you can install a desktop environment.
KDE Plasma (Full-featured)
sudo pacman -Syu
sudo pacman -S xorg plasma plasma-wayland-session kde-applications
Enable the display manager:
sudo systemctl enable sddm
GNOME (Modern and clean)
sudo pacman -S xorg gnome gnome-extra
Enable the display manager:
sudo systemctl enable gdm
Xfce (Lightweight)
sudo pacman -S xorg xfce4 xfce4-goodies lightdm lightdm-gtk-greeter
Enable the display manager:
sudo systemctl enable lightdm
i3 (Tiling window manager)
sudo pacman -S xorg i3-wm i3status i3lock dmenu
Create .xinitrc:
echo "exec i3" > ~/.xinitrc
Start X manually with:
startx
Essential Post-Installation Packages
# AUR helper (yay)
sudo pacman -S --needed git base-devel
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
# Useful utilities
sudo pacman -S firefox vlc gimp libreoffice-fresh htop neofetch
# Audio support
sudo pacman -S pipewire pipewire-alsa pipewire-pulse pipewire-jack wireplumber
# Bluetooth support
sudo pacman -S bluez bluez-utils
sudo systemctl enable bluetooth
Troubleshooting Tips
If WiFi doesn't work after reboot:
sudo systemctl start NetworkManager
sudo nmcli device wifi list
sudo nmcli device wifi connect "SSID" password "password"
If audio doesn't work:
sudo pacman -S alsa-utils
alsamixer # Press F6 to select sound card, unmute with 'M'
Check system logs for errors:
journalctl -b # Boot logs
journalctl -xe # Recent errors
Congratulations!
You now have a fully functional Arch Linux installation. Welcome to the Arch community!
I use Arch BTW! 🐧
Useful Resources
- Arch Wiki - The most comprehensive Linux documentation
- Arch Forums - Community support
- r/archlinux - Reddit community
- AUR - Arch User Repository for additional packages
Remember: The Arch Wiki is your best friend. Always RTFM (Read The Fine Manual)!