Arch Linux Installation Guide

Please read and understand everything shown carefully before starting.

Requirements

  1. PC/Laptop
  2. UEFI Firmware is only recommendet
  3. Disabled Secure Boot
  4. A bootable USB stick with an ISO image
    • You can test the Arch Linux installation in a virtual machine.
    • Download the Arch Linux ISO here.
  5. Tools to create a bootable USB stick:

Installation Steps

Step Action
1 Set Up Keyboard Layout
2 Check if Booted to UEFI
3 Check Internet Connection
4 Connect to Wifi (if used)
5 Get Disk Information
6 Partition the Disk
7 Format the Partitions
8 Mount the Partitions to Install Linux Base System
9 Make downloads faster
10 Install the Linux Base System
11 Setup swapfile
12 Access the Root System
13 Install Requirements
14 Configure Arch System
15 Install Bootloader
16 Install a Desktop Environment
17 Install Recommended and Required Stuff
18 Install NVIDIA Drivers (Required to change the NVIDIA driver later)
19 Reboot System
20 Change Keyboard Layout
21 Change Timezone
22 Settings needed to Install the Open NVIDIA Drivers from CachyOS
23 Install CachyOS Repos
24 Install yay and paru
25 Install Chaotic-AUR Repos
26 Install CachyOS Kernel Manager & Other Things
27 Install Open NVIDIA Driver (Recommended)
28 Change Bootloaderconfig
29 Patch Pacman
30 Make Your System More Stable
31 Virtualization Tools

1. Set Up Keyboard Layout

localectl list-keymaps

List all available keyboard layouts.

loadkeys de

Load the selected keyboard layout (default is US).

2. Check if Booted to UEFI

efivar -l

If lots of unknown text appears on your screen that you don’t understand, it means you booted into UEFI mode.

3. Check Internet Connection

ping archlinux.org

This will ping a website and show an output in bytes to check if you’re connected to the internet.

4. Connect to Wifi (if used)

iwctl

Use this tool to show wifi information and connect to it.

station device scan

Replace device with your wifi adapter name.

station device get-networks

Replace device again with your WiFi adapter name and list the available networks.

station device connect Wifi-Name

Replace Wifi-Name with your real wifi name and enter the password.

5. Get Disk Information

lsblk

This will show all information about your installed disks. You can use it anytime after changing your disks to display the updated information.

6. Partition the Disk

cfdisk /dev/nvme0n1

This will use the cfdisk tool for easier partitioning of your disk.

Disk Partitioning:

7. Format the Partitions

mkfs.fat -F32 /dev/nvme0n1p1

Format the EFI/Boot partition to FAT32.

mkfs.ext4 /dev/nvme0n1p2

Format your Linux filesystem partition to the Linux ext4 file system.

8. Mount the Partitions to Install Linux Base System

mount /dev/nvme0n1p2 /mnt

Mount your Linux filesystem partition to /mnt.

mkdir /mnt/boot

Create a directory for your bootloader.

mount /dev/nvme0n1p1 /mnt/boot

Mount the EFI/Boot partition to /boot.

9. Make downloads faster

nano /etc/pacman.conf

Enable parallel downloads by removing the # from the respective line. (If you are unsure about the config, leave it at 5.)

10. Install the Linux Base System

pacstrap -K /mnt base base-devel linux linux-firmware

Install the base Linux system to your root directory.

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

Generate an fstab file.

11. Setup swapfile

fallocate -l 4G /mnt/swapfile

Set your size and directory of your swap file.

chmod 600 /mnt/swapfile

Make your swap file only accessible by root for security reasons.

mkswap /mnt/swapfile

Format the swap file to the swap file system.

swapon /mnt/swapfile

Enable the swap file system.

nano /mnt/etc/fstab

Add /swapfile none swap defaults 0 0 into that config – you can optionally add a comment (e.g. # swapfile) on the line above.

12. Access the Root System

arch-chroot /mnt

Switch to the shell of your installed system.

13. Install Requirements

pacman -S networkmanager nano

Install NetworkManager and nano.

systemctl enable NetworkManager

Enable the NetworkManager service.

14. Configure Arch System

nano /etc/locale.gen

Find your language (e.g., de_DE), uncomment it, and save changes.

locale-gen

Apply the language settings to your system.

echo LANG=de_DE.UTF-8 >> /etc/locale.conf

Add your language configuration.

export LANG=de_DE.UTF-8
echo iusearchbtw >> /etc/hostname

Replace iusearchbtw with your preferred hostname.

ln -sf /usr/share/zoneinfo/

Navigate to your timezone directory (e.g., Europe/Berlin) and link it:

ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime
hwclock --systohc --localtime
systemctl enable fstrim.timer
nano /etc/pacman.conf

- Uncomment [multilib] (not multilib-testing) and enable parallel downloads (change the number up to your internet’s capability, maximum is 20).

pacman -Sy
passwd

Set a password for the root user.

useradd -m -G wheel -s /bin/bash <username>

Replace <username> with your desired username.

passwd <username>

Set a password for your new user.

nano /etc/sudoers

Uncomment %wheel ALL=(ALL) ALL. (Optionally add Defaults rootpw to require the root password for sudo.)

15. Install Bootloader

exit
systemctl daemon-reload
arch-chroot /mnt
bootctl install

This installs the bootloader.

nano /boot/loader/entries/arch.conf

Name the config file as desired. Paste this into the config file:

title Arch Linux
linux /vmlinuz-linux
initrd /initramfs-linux.img

You may replace Arch Linux with your chosen title in the bootloader menu.

echo "options root=PARTUUID=$(blkid -s PARTUUID -o value /dev/nvme0n1p2) rw" >> /boot/loader/entries/arch.conf

Make sure to specify the correct disk (e.g. /dev/nvme0n1p2).

16. Install a Desktop Environment

pacman -S gnome-shell gnome-terminal gnome-control-center gnome-software gnome-menus gnome-shell-extensions gnome-system-monitor mutter gdm

You can also install gnome for a complete setup. The example above is for a minimal installation to avoid bloatware.

systemctl enable gdm

If you prefer another desktop environment or window manager, the installation steps will different.

18. Install NVIDIA Drivers (Required to change the NVIDIA driver later)

pacman -S nvidia-dkms libglvnd nvidia-utils opencl-nvidia lib32-libglvnd lib32-nvidia-utils lib32-opencl-nvidia nvidia-settings
pacman -S linux-headers
nano /etc/mkinitcpio.conf

Add the following to MODULES=(): nvidia nvidia_modeset nvidia_uvm nvidia_drm

mkdir /etc/pacman.d/hooks
nano /etc/pacman.d/hooks/nvidia.hook

Insert the following content into the hook file:

[Trigger]
Operation=Install
Operation=Upgrade
Operation=Remove
Type=Package
Target=nvidia

[Action]
Depends=mkinitcpio
When=PostTransaction
Exec=/usr/bin/mkinitcpio -P

This ensures the correct NVIDIA modules are loaded and that the mkinitcpio image updates automatically.

19. Reboot System

exit
umount -R /mnt
reboot

20. Change Keyboard Layout

21. Change Timezone

sudo timedatectl set-timezone Europe/Berlin

Select your right Timezone.

22. Settings needed to Install the Open NVIDIA Drivers from CachyOS

sudo nano /etc/mkinitcpio.conf

Remove from MODULES=(): nvidia nvidia_modeset nvidia_uvm nvidia_drm

23. Install CachyOS Repos

wget https://mirror.cachyos.org/cachyos-repo.tar.xz
tar xvf cachyos-repo.tar.xz && cd cachyos-repo
sudo ./cachyos-repo.sh
cd ..
sudo rm -r cachyos-repo.tar.xz cachyos-repo

24. Install yay and paru

sudo pacman -S yay
yay -S paru

25. Install Chaotic-AUR Repos

sudo -i
pacman-key --recv-key 3056513887B78AEB --keyserver keyserver.ubuntu.com
pacman-key --lsign-key 3056513887B78AEB
pacman -U 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-keyring.pkg.tar.zst'
pacman -U 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-mirrorlist.pkg.tar.zst'
exit
sudo gedit /etc/pacman.conf

Cut all the cachyos repos (from line 77 to line 87) to the end of the config. Remove the last 5 lines and replace them with the cachyos repos. Then add:

[chaotic-aur]
Include = /etc/pacman.d/chaotic-mirrorlist
sudo pacman -Sy

26. Install CachyOS Kernel Manager & Other Things

sudo pacman -S cachyos-kernel-manager cachyos-gaming-meta cachyos-settings

Launch the CachyOS Kernel Manager: Select "Configure" and under "Options," select the "RC - Release Candidate," then click on "Build Kernel." (Only if you do not have the latest RC kernel linux-cachyos-rc or if you prefer to use a stable kernel (linux-cachyos) with lower performance.) Proceed with the installation.

28. Change Bootloaderconfig

sudo nano /boot/loader/entries/arch.conf
linux /vmlinuz-linux-cachyos
initrd /initramfs-linux-cachyos.img

Change the lines in the config to match and boot into the new kernel you installed.

29. Patch Pacman

sudo pacman -S pacman

30. Make Your System More Stable

sudo pacman -Syuu

Not really recommended: If you have problems or annoying outputs every time you use the pacman command, you can try disabling the core repo in /etc/pacman.conf by commenting it out with a #.

wget https://mirror.cachyos.org/cachyos-repo.tar.xz
tar xvf cachyos-repo.tar.xz && cd cachyos-repo
sudo ./cachyos-repo.sh
cd ..
sudo rm -r cachyos-repo.tar.xz cachyos-repo

If something breaks, this will reinstall the CachyOS repos and should fix all pacman errors.

31. Virtualization Tools

If you are running the system in a VM, it is recommended to install these things for your VM software:

VMware Tools

sudo pacman -S open-vm-tools xf86-video-vmware xf86-input-vmmouse
sudo systemctl enable vmtoolsd
sudo systemctl start vmtoolsd

Spice Tools (for KVM)

sudo pacman -S spice-vdagent
sudo systemctl enable spice-vdagentd
sudo systemctl start spice-vdagentd