Skip to content

Step-by-step Installation guide for Arch Linux⚓︎

This page outlines a basic installation of Arch upon which you can build your system

Info

Having Arch wiki and installation guide open on your mobile or other computer can be useful

Prerequisites⚓︎

Basic setup before chroot⚓︎

Connect to internet⚓︎

Note

PlaceHolder Description Dummy Value
yourWiFiPassphrase Password for your WiFi 123456qwerty
yourDeviceName Your WiFi device on Computer wlan0
yourWifiSSID Your WiFi name or SSID Hudater
  • Get your wireless device name
    Most likely wlan0
    ip a
    
  • Change values according to your setup and execute command
    Bash
    iwctl --passphrase yourWiFiPassphrase station yourDeviceName connect yourWifiSSID
    
  • Command with Dummy Values
    Bash
    iwctl --passphrase 123456qwerty station wlan0 connect Hudater
    
  • Invoke interactive prompt for iwd
    Bash
    iwctl
    
  • List wireless devices
    Bash
    device list
    
  • Scan initiation
    Bash
    station yourDeviceName scan
    
  • List all available WiFi networks
    Bash
    station yourDeviceName get-networks
    
  • Connect to desired network via SSID
    Bash
    station yourDeviceName connect yourWifiSSID
    
  • If you are hard-wired via Ethernet or Fiber to your computer, you will likely get an IP assigned via DHCP
  • Verify connection by pinging some website
    Bash
    ping gnu.org
    
  • If you don't have connection check your interface
    Bash
    ip a
    
  • If interface is down or doesn't have an IP, troubleshoot from the wiki

Enable NTP for system clock⚓︎

Bash
timedatectl set-ntp true
  • Check if NTP is active
    Bash
    timedatectl
    

Disk Setup⚓︎

Partiton Disk⚓︎

Warning

For help, type m and q to quit without writing
++keyName++ means keyName to be pressed. It's not rendered inside code block

  • Execute fdisk with destination drive
Bash
fdisk /dev/nvme0n1
  • Create new partition table. IT WILL ERASE WHOLE DISK
Bash
g
  • Create two new partitions for /boot and /
Bash
1
2
3
4
5
6
n
++enter++ #(1)
++enter++
+512M #(2)
t #(3)
1
  1. Press Enter twice
  2. 512MB /boot or boot partition
  3. Change partition type for /boot to EFI
Bash
1
2
3
4
n
++enter++ #(1)
++enter++
+150G #(2)
  1. Press Enter twice
  2. 150GB / or root partition
  • Write your changes
Bash
w

Make Filesystem⚓︎

  • Run lsblk to find device names
Bash
lsblk
lsblk output
Bash
1
2
3
4
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
nvme0n1     259:0    0 465.8G  0 disk
├─nvme0n1p1 259:1    0   512M  0 part
├─nvme0n1p2 259:2    0   150G  0 part
  • Create filesystem on both partitions
Bash
mkfs.fat -F32 /dev/nvme0n1p1
Bash
mkfs.ext4 /dev/nvme0n1p2

Mount partitions⚓︎

Warning

Mount ROOT partition first

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

Install base system⚓︎

Note

Change the kernel and kernel-headers if you desire so
Add or remove programs as you like

Bash
pacstrap -i /mnt base base-devel linux-zen linux-zen-headers linux-firmware vim git stow openssh mtools dosfstools networkmanager network-manager-applet wireless_tools wpa_supplicant dialog

Generate FSTab⚓︎

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

After Chroot⚓︎

Chroot into the installation now
arch-chroot /mnt
Bash
ln -sf /usr/share/zoneinfo/Asia/Kolkata /etc/localtime

Sync Hardware Clock⚓︎

Bash
hwclock --systohc

Localization and Host⚓︎

Locale.gen⚓︎

  • Uncomment desired locale [en_US.UTF-8 UTF-8]
    Bash
    vim /etc/locale.gen
    

Tip

Search in vim using :+/ then your locale i.e, en_US and press n to forward and uncomment UTF-8 version between the file

Locale.conf⚓︎

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

Generate Locale⚓︎

Bash
locale-gen

Hostname⚓︎

Bash
echo "pc" >> /etc/hostname

Hosts⚓︎

vim /etc/hosts
1
2
3
4
5
# Static table lookup for hostnames.
# See hosts(5) for details.
127.0.0.1   localhost.lan   localhost
::1         localhost.lan   localhost
127.0.0.1   pc.lan          pc

Bootloader⚓︎

Refind⚓︎

  • Install packages

    Bash
    pacman -Sy refind efibootmgr
    

  • Install refind on drive

    Use BOOT Partition device name here
    refind-install --usedefault /dev/nvme0n1p1 --alldrivers
    

  • Generate refind config

    Bash
    mkrlconf
    

  • Edit refind config

Warning

Change PARTUUID of root partition using blkid

vim /boot/refind_linux.conf
"Boot with minimal options" "ro root=PARTUUID=32768bfc-d092-224b-b36e-0b415dcf40c5"

Pacman⚓︎

  • Edit pacman config

    Bash
    vim /etc/pacman.conf
    

  • Enable Parallel Downloads and Colors

    Bash
    1
    2
    3
    Color
    ILoveCandy
    ParallelDownloads = 5
    

  • Enable Multilib support

    Bash
    [multilib]
    Include = /etc/pacman.d/mirrorlist
    

  • Fix mirrors with reflector

    Install reflector first
    sudo reflector --latest 50 --protocol http --protocol https --sort rate --save /etc/pacman.d/mirrorlist
    

Users and Sudo⚓︎

  • Set root password

    Bash
    passwd root
    

  • Create standard user

    Bash
    useradd -m -u 1000 -G wheel userName
    

  • Password for standard user

    Bash
    passwd userName
    

  • Edit sudoers file

EDITOR=vim visudo
1
2
3
4
5
@includedir /etc/sudoers.d #(1)
Defaults        insults
Defaults        env_reset,timestamp_timeout=60 #(2)
%wheel ALL=(ALL) ALL
ALL ALL=NOPASSWD: /sbin/poweroff,/sbin/reboot,/sbin/shutdown
  1. Move this line to top for passwordless commands to work
  2. This CAN BE a security risk. Not suggested to use

Services⚓︎

systemd-timesyncd sshd Network-Manager

Success

Basic Arch installation is complete here. Reboot now to your new installation

Post Installation⚓︎

Warning

Install chaotic-aur after enabling NTP

Wifi⚓︎

sudo nmtui wifi

Package Manager⚓︎

Warning

Visit official website for latest installation steps if out-of-date here

  • Install Primary key, Keyring and Mirrorlist

    Bash
    1
    2
    3
    sudo pacman-key --recv-key FBA220DFC880C036 --keyserver keyserver.ubuntu.com &&\
    pacman-key --lsign-key FBA220DFC880C036 &&\
    pacman -U 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-keyring.pkg.tar.zst' 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-mirrorlist.pkg.tar.zst'
    

  • Add Mirrorlist to pacman.conf

    vim /etc/pacman.conf
    [chaotic-aur]
    Include = /etc/pacman.d/chaotic-mirrorlist
    

  • Install Paru from Chaotic-AUR

    Bash
    pacman -Sy paru
    

  • Edit Paru config

    Bash
    sudoedit /etc/paru.conf
    

  • Uncomment these options

    Bash
    BottomUp
    SudoLoop
    

Packages⚓︎

Basic packages⚓︎

Bash
paru -Sy absolutely-proprietary alacritty android-file-transfer android-tools anydesk-bin arandr authy awesome bat bpytop brave-bin chromium corectrl cpufetch-git curl dialog discord dosfstools drawio-desktop-bin duf exa feh firefox ffmpeg gimp git go gparted htop imwheel iperf3 kitty libreoffice-still lshw lxappearance-gtk3 mpv mtools nano nautilus nautilus-copy-path ncdu neofetch neovim network-manager-applet networkmanager nfs-utils nitrogen nmap noto-fonts noto-fonts-emoji noto-fonts-extra ntfs-3g numlockx nvtop openbsd-netcat openssh otf-font-awesome picom-ibhagwan-git python-pip qt5-styleplugins qt5ct radeontop redshift reflector rofi rpi-imager-bin rsync samba scrot sshfs starship stow sxiv syncthing tldr traceroute ttf-font-awesome ttf-ms-fonts unrar unzip ventoy-bin vi vim volumeicon vscodium-bin vscodium-bin-marketplace wget wireless_tools woeusb wol wpa_supplicant xclip xorg xorg-xinit xterm youtube-dl zathura zathura-pdf-mupdf zsh --noconfirm

Audio Packages⚓︎

Bash
paru -Sy pipewire pipewire-pulse pavucontrol wireplumber --noconfirm

GPU Drivers⚓︎

AMD⚓︎
Bash
paru -Sy xf86-video-amdgpu lib32-mesa vulkan-radeon lib32-vulkan-radeon libva-mesa-driver lib32-libva-mesa-driver vulkan-icd-loader lib32-vulkan-icd-loader --noconfirm
Intel⚓︎
Bash
paru -Sy mesa lib32-mesa --noconfirm

Success

Move onto Basic setup guide now