Arch Linux Installation Guide

website·Indexed 31 days ago

https://arch.d3sox.me/

A comprehensive guide for installing Arch Linux on BIOS and UEFI systems. Covers live setup, partitioning, formatting, base installation, bootloader configuration, user setup, and desktop environment installation (Xorg or Wayland). Includes sections on disk encryption, post-installation configuration, gaming optimizations, and performance tweaks.

Tokens
8.8K
Snippets
98
Records
103
Agent score
50%

What's inside Arch Linux

  1. Enable Bluetooth support

    Install the BlueZ stack and enable the bluetooth service. If using PulseAudio, install the pulseaudio-bluetooth package for audio support.
    pacman -S bluez bluez-utils
    systemctl enable bluetooth
    # For PulseAudio users:
    pacman -S pulseaudio-bluetooth
  2. Create and open a LUKS encrypted container

    Initialize a partition as a LUKS encrypted container and open it to map it as a device (e.g., cryptroot) that can be used for LVM or filesystems.
    # Format the partition with LUKS
    cryptsetup luksFormat -c aes-xts-plain64 -s 512 /dev/sdXZ
    
    # Open the container and map it to 'cryptroot'
    cryptsetup open /dev/sdXZ cryptroot
  3. Force a user to change password on first login

    Use the chage command with the -d 0 flag to expire the user's password, forcing them to update it immediately upon their first login.
    chage -d 0 yourusername
  4. Create a new user with standard group permissions

    Create a new user account with a home directory (-m), a bash shell (-s /bin/bash), and membership in essential groups including audio, video, input, wheel, sys, log, rfkill, lp, and adm. After creating the user, set their password using passwd.
    useradd -m -G audio,video,input,wheel,sys,log,rfkill,lp,adm -s /bin/bash yourusername
    passwd yourusername
  5. Install GRUB bootloader on BIOS systems

    To install the GRUB bootloader on a system using BIOS, install the grub package, install the bootloader to the disk, and generate the configuration file.
    pacman -S grub
    grub-install --target=i386-pc --recheck /dev/sdX
    grub-mkconfig -o /boot/grub/grub.cfg
  6. Enable sudo administrative privileges for the wheel group

    Install the sudo package and configure the sudoers file to grant administrative privileges to members of the wheel group. Use visudo to edit the configuration and uncomment the line %wheel ALL=(ALL) ALL.
    pacman -S sudo
    EDITOR=nano visudo

    In the visudo editor, uncomment this line:

    %wheel ALL=(ALL) ALL

  7. Install graphics drivers and Vulkan support

    Install Mesa and Vulkan loaders for general GPU support. Choose the appropriate driver based on the hardware: NVIDIA (proprietary or Nouveau), AMD, or Intel. For virtual machines, use xf86-video-vmware or xf86-video-fbdev (Hyper-V).
    # General GPU support
    pacman -S mesa lib32-mesa
    pacman -S vulkan-icd-loader lib32-vulkan-icd-loader
    
    # NVIDIA Proprietary
    pacman -S nvidia nvidia-utils lib32-nvidia-utils libvdpau lib32-libvdpau
    
    # AMD Utils
    pacman -S libva-mesa-driver lib32-libva-mesa-driver vulkan-radeon lib32-vulkan-radeon
    
    # Intel Utils
    pacman -S vulkan-intel
  8. Install general system utilities and headers

    Install essential system headers, DKMS, and general-purpose utilities including git, wget, and network tools. Enable necessary system services for power management, network discovery, and time synchronization.
    pacman -S linux-headers dkms
    pacman -S jshon expac git wget acpid avahi net-tools xdg-user-dirs
    systemctl enable acpid avahi-daemon systemd-timesyncd
  9. Restore installed packages from a list in Arch Linux

    To reinstall all packages from a previously generated pkglist.txt file, use the -S --needed - flags with your AUR helper. The --needed flag ensures that only packages not already installed are downloaded, and the - tells the package manager to read the list from standard input.
    # Restore packages using paru
    paru -S --needed - < pkglist.txt
    
    # Restore packages using yay
    yay -S --needed - < pkglist.txt
  10. Enter the installed system via arch-chroot

    Change the root directory to the newly installed system at /mnt. This allows you to perform further configuration (like setting passwords or bootloaders) from within the installed environment.
    arch-chroot /mnt