Home Posts X GitHub

Arch Linux Install Guide 2024

Arch Linux allows for extensive customization during installation. This can be both exciting and overwhelming.

I’ve compiled these notes during installation. They’re raw, so refer to the Wiki for detailed instructions. I followed the same order, making it easy to compare and adjust based on your preferences.

This installation should serve as a solid foundation for a minimal Window Manager setup (e.g., Hyprland, Sway).

For a quicker setup, consider the official ArchInstall. However, manual installation can be more rewarding and educational.

What I Learned


# Load keyboard layout if non-QWERTY
loadkeys xx

# Check for UEFI mode
cat /sys/firmware/efi/fw_platform_size # should return 64

# Wireless setup
  device list
  station <device> scan
  station <device> connect <SSID>

# Ensure accurate time

# Wipe disk securely
lsblk # List your disks
cryptsetup open --type plain -d /dev/urandom \
  /dev/<block-device> to_be_wiped
dd if=/dev/zero of=/dev/mapper/to_be_wiped status=progress
cryptsetup close to_be_wiped

# Partition disk
cfdisk /dev/sdX
  boot 1 GiB # EFI System
  root # Linux root (x86-64)

# Format and mount partitions
mkfs.fat -F32 /dev/sdX1
cryptsetup luksFormat /dev/sdX2
cryptsetup open /dev/sdX2 cryptroot
mkfs.ext4 /dev/mapper/cryptroot
mount /dev/mapper/cryptroot /mnt
mount --mkdir /dev/sdX1 /mnt/boot

# Configure mirrorlist

# Install base system
pacstrap -K /mnt base linux linux-firmware intel-ucode \
 e2fsprogs ntfs-3g sudo iwd pacman-contrib reflector \
 man-db man-pages texinfo git neovim

# Copy network configuration
cp /etc/systemd/network/* /mnt/etc/systemd/network

# Chroot into the new system
arch-chroot /mnt

# Configure the system
ln -sf /usr/share/zoneinfo/Region/City /etc/localtime
hwclock --systohc
nvim /etc/locale.gen # Uncomment en_US.UTF-8
nvim /etc/locale.conf # LANG=en_US.UTF-8
nvim /etc/vconsole.conf # KEYMAP=xx
nvim /etc/hostname
nvim /etc/hosts        localhost
  ::1              localhost

nvim /etc/mkinitcpio.conf
  # 'keyboard' needs to be before autodect if using a laptop
  HOOKS=(systemd autodetect microconf modconf kms keyboard sd-vconsole
    block sd-encrypt filesystems fsck)
mkinitcpio -P

ls /sys/firmware/efi/efivars # Must exist
# "world accessible" warning can be ignored,
# /boot will be mounted with the correct permissions on reboot
bootctl install
nvim /boot/loader/loader.conf # Use spaces instead of tabs
  default  arch.conf
  timeout  4
  console-mode max
  editor   no

nvim /boot/loader/entries/arch.conf
  title   Arch Linux
  linux   /vmlinuz-linux
  initrd  /initramfs-linux.img

nvim /boot/loader/entries/arch-fallback.conf
  title   Arch Linux (fallback initramfs)
  linux   /vmlinuz-linux
  initrd  /initramfs-linux-fallback.img

# Create user
useradd -m -G wheel <username>
passwd <username>
passwd --lock root # Disable root password

# Configure sudoers
EDITOR=nvim visudo -f /etc/sudoers.d/editor
  Defaults  editor=/usr/bin/nvim
visudo -f /etc/sudoers.d/wheel
  %wheel    ALL=(ALL:ALL) ALL

# Enable essential services
sudo systemctl enable systemd-boot-update.service
sudo systemctl enable systemd-timesyncd
sudo systemctl enable iwd
sudo systemctl enable systemd-resolved
sudo systemctl enable systemd-networkd
sudo systemctl enable paccache.timer
sudo systemctl enable reflector.timer
# https://wiki.archlinux.org/title/Solid_state_drive
sudo systemctl enable fstrim.timer

# Exit chroot and reboot
umount -R /mnt
cryptsetup close cryptroot

# Some programs like browsers, Go and GnuPG read from resolv.conf
sudo ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf

# Install keyring and login manager
sudo pacman -S gnome-keyring libsecret seahorse greetd

# Configure autologin
nvim /etc/greetd/config.tom
  command = "<command to start your window manager>"
  user = "<username>"

# Configure PAM for gnome-keyring
nvim /etc/pam.d/greetd

  auth       required     pam_securetty.so
  auth       requisite    pam_nologin.so
  auth       optional     pam_gnome_keyring.so
  auth       include      system-local-login
  account    include      system-local-login
  session    include      system-local-login
  session    optional     pam_gnome_keyring.so auto_start

# Install Chrome
cd ~/builds
git clone https://aur.archlinux.org/google-chrome.git
cd google-chrome
less PKGBUILD # Verify build script
makepkg -sirc

nvim ~/.config/chrome-flags.conf

From there, you can install a WM like Hyprland or Sway:

Have fun ^_^


These notes reflect my personal exploration with Arch Linux. Feel free to modify and experiment with your own setup. The Arch Linux community and the Wiki are invaluable resources for guidance and troubleshooting.