DEV Community

Cover image for Installing Arch Linux in 2026 (step-by-step)
ZionS1_1
ZionS1_1

Posted on

Installing Arch Linux in 2026 (step-by-step)

There won’t be a more important soft skill to learn in 2026 than Bash.
An excellent way to evolve your skills is to download and install Arch Linux, which is the best option in terms of optimization, customization, and compatibility.
With the commands below, you will be able to install Arch Linux without using the archinstall command.

Download the Arch Linux ISO

| Brazilian servers to download the .iso:

Basic commands used during mounting

Command Function
ls Lists files and directories in the current directory
cd Changes the current directory
lsblk Lists block devices (disks, SSDs, partitions) and mount points
mount Mounts a filesystem to a directory
rm -rf Forcefully and recursively removes files and directories
mkdir Creates directories
cat Displays the contents of text files or concatenates files
systemctl Manages systemd services (start, stop, enable at boot)
echo Prints text to the terminal or writes text to files with redirection
shutdown Shuts down or restarts the system
exit Ends the current shell session

Increase terminal font size

setfont ter-132b
Enter fullscreen mode Exit fullscreen mode

Set the keyboard to ABNT-2

loadkeys br-abnt2
Enter fullscreen mode Exit fullscreen mode

Result:

loadkeys

Testing internet connection (wired)

ping -c 3 archlinux.org
Enter fullscreen mode Exit fullscreen mode

Ping

If you are using Wi-Fi, look up additional instructions.

Check if the system booted in EFI mode

ls /sys/firmware/efi
Enter fullscreen mode Exit fullscreen mode

efi path

If the directory does not exist, the system was booted incorrectly.

Listing all HDDs/SSDs on the machine

lsblk
Enter fullscreen mode Exit fullscreen mode

Result:

Terminal result

Select the device where Arch Linux will be installed

cfdisk /dev/sda
Enter fullscreen mode Exit fullscreen mode

When asked to choose the partition table type, select gpt.

label type

  • First partition: 256m
  • Second partition: 10g
  • Third partition: 15g
  • Fourth partition: use the remaining space

sda

Megabytes are represented by m and gigabytes by g.

After that, just select Write, type yes, and then choose Quit.

Partitions

There will be 4 partitions:

  • 1st: 256m, type EFI System
  • 2nd: 20g, type Linux filesystem
  • 3rd: 25g, type Linux filesystem
  • 4th: remaining space, type Linux swap

Then select Write, type yes, and click Quit.

lsblk
Enter fullscreen mode Exit fullscreen mode

Result:

lsblk result

This command displays a clear, hierarchical (tree-like) view of your storage devices, such as:

  • Hard drives (HDDs/SSDs)
  • Partitions
  • Logical volumes (LVM)
  • CD/DVD devices (ROMs)
  • USB drives and other removable media

📂 Formatting partitions

mkfs.fat -F32 /dev/sda1
Enter fullscreen mode Exit fullscreen mode

Result:

mkfs.fat sda1

mkfs.ext4 /dev/sda2
Enter fullscreen mode Exit fullscreen mode

Result:

mkfs.ext4 sda2

mkfs.ext4 /dev/sda3
Enter fullscreen mode Exit fullscreen mode

Result:

mkfs.ext4 sda3

mkswap /dev/sda4
Enter fullscreen mode Exit fullscreen mode

Result:

mkswap sda4

📌 Mounting partitions

mount /dev/sda2 /mnt
Enter fullscreen mode Exit fullscreen mode
mkdir /mnt/home
Enter fullscreen mode Exit fullscreen mode
mkdir /mnt/boot
Enter fullscreen mode Exit fullscreen mode
mkdir /mnt/boot/efi
Enter fullscreen mode Exit fullscreen mode
ls /mnt
Enter fullscreen mode Exit fullscreen mode

Result:

ls mnt

mount /dev/sda3 /mnt/home
Enter fullscreen mode Exit fullscreen mode
mount /dev/sda1 /mnt/boot/efi
Enter fullscreen mode Exit fullscreen mode
swapon /dev/sda4
Enter fullscreen mode Exit fullscreen mode

🚀 Base system installation

lsblk
Enter fullscreen mode Exit fullscreen mode

Result:

lsblk mount

pacman -Sy
Enter fullscreen mode Exit fullscreen mode
pacman -S reflector
Enter fullscreen mode Exit fullscreen mode
reflector --country Brazil --latest 20 --sort rate --verbose --save /etc/pacman.d/mirrorlist
Enter fullscreen mode Exit fullscreen mode

Result:

reflector

nano /etc/pacman.d/mirrorlist
Enter fullscreen mode Exit fullscreen mode

Result:

pacman list

pacstrap /mnt base base-devel linux linux-headers linux-firmware nano vim
Enter fullscreen mode Exit fullscreen mode

🧾 Generate fstab

genfstab /mnt
Enter fullscreen mode Exit fullscreen mode

Result:

genfstab mnt

genfstab -U /mnt >> /mnt/etc/fstab
Enter fullscreen mode Exit fullscreen mode
cat /mnt/etc/fstab
Enter fullscreen mode Exit fullscreen mode

Result:

cat fstab

Make sure this information was written correctly.

ls /mnt
Enter fullscreen mode Exit fullscreen mode

Result:

ls mnt

🔐 Enter the installed system

arch-chroot /mnt
Enter fullscreen mode Exit fullscreen mode

Result:

arch chroot

nano /etc/pacman.conf
Enter fullscreen mode Exit fullscreen mode

pacman conf

Remove the comments from Color, increase ParallelDownloads from 5 to 10,
and inside [multilib] remove the comment from Include. Save and exit.

Result:

multilib

🕒 Timezone

ln -sf /usr/share/zoneinfo/America/Sao_Paulo /etc/localtime
Enter fullscreen mode Exit fullscreen mode
hwclock --systohc
Enter fullscreen mode Exit fullscreen mode
timedatectl set-ntp true
Enter fullscreen mode Exit fullscreen mode
date
Enter fullscreen mode Exit fullscreen mode

Result:

date

🌍 Language

nano /etc/locale.gen
Enter fullscreen mode Exit fullscreen mode

Result:

locale gen

Select the language you want for your system. I chose pt_BR.UTF-8 UTF-8.

locale-gen
Enter fullscreen mode Exit fullscreen mode

Result:

locale gen

echo "LANG=pt_BR.UTF-8" >> /etc/locale.conf
Enter fullscreen mode Exit fullscreen mode

Verify:

nano /etc/locale.conf
Enter fullscreen mode Exit fullscreen mode

Result:

locale.conf

⌨️ Keyboard

echo "KEYMAP=br-abnt2" >> /etc/vconsole.conf
Enter fullscreen mode Exit fullscreen mode

Verify:

nano /etc/vconsole.conf
Enter fullscreen mode Exit fullscreen mode

Result:

vconsole

🖥️ Hostname

echo "archlinux" >> /etc/hostname
Enter fullscreen mode Exit fullscreen mode

Verify:

nano /etc/hostname
Enter fullscreen mode Exit fullscreen mode

Result:

hostname

nano /etc/hosts
Enter fullscreen mode Exit fullscreen mode

Result:

hosts

🔑 Users and permissions

passwd
Enter fullscreen mode Exit fullscreen mode

Result:

passwd

Be very careful when editing this file, as it can break the entire system

nano /etc/sudoers
Enter fullscreen mode Exit fullscreen mode

Result:

sudoers

Remove the comment only from %wheel ALL=(ALL:ALL) ALL.

Choosing a username

useradd -mG wheel (choose a username)
Enter fullscreen mode Exit fullscreen mode

Creating the user password

passwd (username)
Enter fullscreen mode Exit fullscreen mode

Result:

passwd user

🧰 Bootloader and network

Package Description
dosfstools Tools to create and check FAT filesystems (FAT16/FAT32), mainly for EFI
mtools Tools to access and manipulate FAT filesystems without mounting them
os-prober Detects other operating systems to add them automatically to GRUB
networkmanager Manages network connections (Wi-Fi, Ethernet, VPN)
grub GRand Unified Bootloader, responsible for booting the OS
efibootmgr Tool to manage UEFI boot entries directly from firmware
pacman -S dosfstools mtools os-prober networkmanager grub efibootmgr
Enter fullscreen mode Exit fullscreen mode

Pay close attention when typing these commands. Any error may require reinstalling everything.

grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=archlinux --recheck
Enter fullscreen mode Exit fullscreen mode

Result:

grub install

If you are doing a dual boot with Windows

nano /etc/default/grub
Enter fullscreen mode Exit fullscreen mode

Result:

grub disable

Uncomment the line GRUB_DISABLE_OS_PROBER=false.

grub-mkconfig -o /boot/grub/grub.cfg
Enter fullscreen mode Exit fullscreen mode

Result:

grub mkconfig

systemctl enable NetworkManager
Enter fullscreen mode Exit fullscreen mode

Result:

systemctl NetworkManager

🔄 Final steps

exit
Enter fullscreen mode Exit fullscreen mode

Result:

exit terminal

shutdown -r now
Enter fullscreen mode Exit fullscreen mode

🎉 Arch Linux installed successfully!
Now you have a clean, fast system that is fully under your control.
However, you still need to follow another guide to install a window manager or desktop environment such as KDE Plasma or Hyprland.

Top comments (0)