🐧 Arch Linux Installation
Published at 2026-04-04 11:31
I use Arch, now, btw. So I thought that posting a tutorial on how
to easily install it would be a nice addition to my capsule.
I assume you already downloaded an ISO and wrote it to an USB
drive. If not
HTML 💾 Download Arch Linux
Plug in your USB drive and boot from it. Ready?
Let's get started.
📡 Connect to the internet (wireless) with the iwctl utility
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
You can skip this step if you connect your computer to the
internet via a wired connection.
Look for your device and connect to your WiFi network. In my case
it's wlan0. To find yours run the Internet wireless control
utility with:
iwctl
Once inside iwctl run:
device list
to view your wireless device. Once you know it you can easily
connect to your SSID with:
# Scan for networks
station DEVICE scan
# List the networks
station DEVICE get-networks
# Connect to your WiFi
station DEVICE connect SSID
# Ex: using wlan0 device to connect to the WiFi [Asus]
station wlan0 connect Asus
# Enter your WiFi password to connect
Once connected to the internet we can carry on with the
installation of Arch Linux.
🕰️ Update system clock
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
timedatectl
🛠️ Locate the installation drive
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
You can easily view all your available block devices, such as
hard drives, SSDs, USB sticks, and partitions, in a tree format
lsblk
My hard drive is /dev/sda. If your hard drive is at another
location like /dev/sdb or /dev/sdc make sure the adapt the
following commands.
✂️ Create partitions
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
I like the cfdisk utility more than fdisk. Using cfdisk create
the following partitions:
cfdisk /dev/sda
UEFI with GPT
‾‾‾‾‾‾‾‾‾‾‾‾‾
If your computer is somewhat new and uses UEFI make sure to
create an EFI partition like I did below:
* EFI partition
* SWAP partition
* root partition
sda 8:0 0 298.1G 0 disk
├─sda1 8:1 0 1G 0 part /boot/efi
├─sda2 8:2 0 4G 0 part [SWAP]
└─sda3 8:3 0 293.1G 0 part /
BIOS with MBR
‾‾‾‾‾‾‾‾‾‾‾‾‾
If your computer is older and doesn't support UEFI you should
create only 2 partition:
* SWAP partition
* root partition (/)
just like in the example below:
sda 8:0 0 298.1G 0 disk
├─sda1 8:2 0 4G 0 part [SWAP]
└─sda2 8:3 0 294.1G 0 part /
🗑️ Format partitions
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
Format root partition
mkfs.ext4 /dev/sda3
Make SWAP partition
mkswap /dev/sda2
Format EFI system partition if it is present
mkfs.fat -F 32 /dev/sda1
📥 Mount partitions
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
# Mount root partition to /mnt
mount /dev/sda3 /mnt
# Enable swap
swapon /dev/sda2
# Mount EFI partition to /mnt/boot/efi
mount --mkdir /dev/sda1 /mnt/boot/efi
📦 Install essential packages
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
pacstrap -K /mnt base linux linux-firmware sof-firmware
base-devel gvim grub efibootmgr networkmanager
Remove efibootmgr from the above command if you are not using
an EFI system
I chose to install gvim instead of vim because it already comes
with clipboard and clipboard_provider preinstalled so it's easier
to copy/paste from and into vim. You can run the vim command to
open vim cli or gvim for a GUI interface (once you have a window
manager).
This can take some time ... grab a 🍺.
📑 Generate an fstab file
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
genfstab -U /mnt >> /mnt/etc/fstab
🪵 chroot to /mnt
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
arch-chroot /mnt
We have left the live environment. Now we're inside the Arch
Linux installation on the hard drive. Changes made here are
permanent.
🌍 Set timezone
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
If you don't know your timezone you can search for it with
timedatectl list-timezones
Once you found your timezone it's time to set it and forget it.
In my case it's Europe/Bucharest:
ln -sf /usr/share/zoneinfo/Europe/Bucharest /etc/localtime
Replace Europe/Bucharest with your timezone
⏳ Run hwclock
‾‾‾‾‾‾‾‾‾‾‾‾‾‾
This command sets the hardware clock from the system clock and
generates /etc/adjtime:
hwclock --systohc
🔐 Change ROOT password
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
passwd
🤖 Add your own user - in this case the user is sava
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
Parameters:
* -m : to create home directory
* -G : to add to the wheel group
* -s : /bin/bash as default shell
useradd -m -G wheel -s /bin/bash sava
🛡️ Change your password
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
passwd sava
🔑 Enable wheel group to be able to use sudo commands
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
EDITOR=vim visudo
Scroll down and look for the line containing
# %wheel ALL=(ALL:ALL) ALL
and uncomment it by deleting the "#" at the start of the line.
🚀 Enable Network Manager at boot
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
systemctl enable NetworkManager
This is necessary. Your WiFi SSID and password are not saved in
the install. You can set these by using nmtui (explained in the
"What to after the first reboot" section).
💽 Bootloader install: GRUB
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
Install GRUB
grub-install /dev/sda
Make GRUB config
grub-mkconfig -o /boot/grub/grub.cfg
If GRUB installs with no errors you should now reboot !
Exit arch-chroot with `exit` and then
reboot
There you have it. A few "simple" commands and you have an OS.
👨💻 What to after the first reboot
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
>_ Login with your user and password. Do not use the root account
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
In my case I login with the user sava and my password.
✨ Run nmtui to permanently connect to your WiFi
nmtui
Select your WiFi and enter your password. Your credential will now
be saved and you'll always be connected.
🪟 Install a window manager
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
Now that your computer is ready to go with a fresh ARCH linux
install you should choose a window manager. There are a lot of
window managers: stacking, tiling and dynamic.
You can view a list of windows managers at:
HTML Arch Linux Wiki - Window Manager
I like and recommend suckless's DWM.
DIR 🪟 Install DWM - Suckless's Window Manager
🪙 Donate
‾‾‾‾‾‾‾‾‾
If this tutorial saved you time, sanity, or a mild existential
crisis... consider fueling future chaos with a small donation:
HTML Buy me a Ko-Fi ☕
DIR 🎓 Back to my tutorials
DIR Back to my homepage