Skip to content

admu-sec/archlinux-installation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

Arch Linux Installation Guide with Hyprland

A clear and detailed guide for installing Arch Linux with Hyprland on a UEFI system.

Note: This guide assumes basic knowledge of Linux and the terminal. Read through each step carefully before executing commands.


Contents


Prerequisites

  • A USB drive (at least 2GB)
  • A computer with UEFI firmware
  • Arch Linux ISO: https://archlinux.org/download
  • A tool to flash the ISO — Rufus on Windows or dd on Linux
  • A stable internet connection

1. Prepare Installation Media

On Windows (Rufus):

  1. Download and open Rufus
  2. Select your USB drive
  3. Select the Arch Linux ISO
  4. Set partition scheme to GPT
  5. Click Start

On Linux:

dd bs=4M if=/path/to/archlinux.iso of=/dev/sdX status=progress oflag=sync

⚠️ Replace /dev/sdX with your USB drive (e.g. /dev/sdb). Double-check the device — wrong target will wipe your data.


2. Boot & Initial Setup

Enter your UEFI/BIOS and set the USB drive as the first boot device, then boot from it.

Verify UEFI mode

ls /sys/firmware/efi/efivars

If the directory exists, you are booted in UEFI mode. If not, check your BIOS settings.

Set keyboard layout (optional)

# List available layouts
ls /usr/share/kbd/keymaps/**/*.map.gz

# Load Swedish layout (example)
loadkeys sv-latin1

Connect to the internet

Ethernet: Should work automatically.

Wi-Fi:

iwctl
station wlan0 scan
station wlan0 get-networks
station wlan0 connect YOUR_NETWORK_NAME
exit

Verify internet connection

ping -c 3 archlinux.org

Update system clock

timedatectl set-ntp true

3. Partition the Disk

Identify your disk

lsblk

Your disk is typically /dev/sda for SATA drives or /dev/nvme0n1 for NVMe drives. Adjust the commands below accordingly.

Start partitioning

fdisk /dev/sda

Required partitions for UEFI:

Partition Size Type Mount point
/dev/sda1 512MB EFI System /boot
/dev/sda2 4–8GB (optional) Linux swap swap
/dev/sda3 Remaining space Linux filesystem /

Inside fdisk:

g          # Create new GPT partition table
n          # New partition (repeat for each partition)
p          # Print partition table to verify
t          # Change partition type (select partition number first)
           # Type 1 = EFI System (for /boot)
           # Type 19 = Linux swap (for swap)
           # Type 20 = Linux filesystem (for /)
w          # Write changes and exit

4. Format & Mount Partitions

Format partitions

# Format EFI partition
mkfs.fat -F32 /dev/sda1

# Format swap
mkswap /dev/sda2

# Format root partition
mkfs.ext4 /dev/sda3

Mount partitions

# Mount root
mount /dev/sda3 /mnt

# Enable swap
swapon /dev/sda2

# Create and mount EFI directory
mkdir -p /mnt/boot
mount /dev/sda1 /mnt/boot

5. Install Base System

pacstrap /mnt base base-devel linux linux-firmware networkmanager vim git

This installs the base system, kernel, firmware, network manager, a text editor and git. May take a few minutes depending on your internet speed.


6. Configure the System

Generate fstab

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

Verify it looks correct with cat /mnt/etc/fstab.

Chroot into the new system

arch-chroot /mnt

Set timezone

# List timezones
timedatectl list-timezones | grep Stockholm

# Set timezone
ln -sf /usr/share/zoneinfo/Europe/Stockholm /etc/localtime
hwclock --systohc

Set locale

# Edit locale.gen and uncomment your locale (e.g. en_US.UTF-8 UTF-8)
vim /etc/locale.gen

# Generate locale
locale-gen

# Set default locale
echo "LANG=en_US.UTF-8" > /etc/locale.conf

Set hostname

echo "yourhostname" > /etc/hostname

Set root password

passwd

Create a user

useradd -m -G wheel -s /bin/bash yourusername
passwd yourusername

Give user sudo privileges

EDITOR=vim visudo
# Uncomment the following line:
# %wheel ALL=(ALL:ALL) ALL

7. Install Bootloader

# Install GRUB and EFI tools
pacman -S grub efibootmgr

# Install GRUB to EFI partition
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB

# Generate GRUB config
grub-mkconfig -o /boot/grub/grub.cfg

Enable NetworkManager

systemctl enable NetworkManager

Exit chroot and reboot

exit
umount -R /mnt
reboot

⚠️ Remove the USB drive when the system shuts down.


8. Post-Installation

Log in with your user account.

Connect to internet

# Wi-Fi via TUI
nmtui

Update the system

sudo pacman -Syu

Install yay (AUR helper)

git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si

Install essential packages

sudo pacman -S pipewire pipewire-alsa pipewire-pulse wireplumber \
  xdg-user-dirs \
  xdg-desktop-portal xdg-desktop-portal-hyprland \
  qt5-wayland qt6-wayland \
  ttf-font-awesome noto-fonts noto-fonts-emoji \
  firefox kitty

xdg-desktop-portal is required as a base alongside xdg-desktop-portal-hyprland for screen sharing and file pickers to work correctly.


9. Install Hyprland

sudo pacman -S hyprland waybar wofi dunst

Package descriptions:

Package Description
hyprland The Wayland compositor
waybar Status bar
wofi Application launcher
dunst Notification daemon
kitty Terminal emulator (installed in step 8)

Create Hyprland config

mkdir -p ~/.config/hypr
cp /usr/share/hypr/hyprland.conf ~/.config/hypr/hyprland.conf

Start Hyprland

Hyprland

Autostart Hyprland on login

Add the following to your ~/.bash_profile to start Hyprland automatically when logging into TTY1:

if [ -z "$WAYLAND_DISPLAY" ] && [ "$XDG_VTNR" -eq 1 ]; then
  exec Hyprland
fi

This check ensures Hyprland only starts on TTY1, not if you log in on another TTY.


10. Ricing Tools

A collection of tools to customize and enhance your Arch Linux setup.

Tool Description
Cmatrix Matrix-style terminal screensaver
Cava Terminal audio visualizer
Btop Resource monitor with a beautiful UI
Peaclock Minimalist terminal clock
Fastfetch Fast system information tool
Cbonsai Animated bonsai tree in the terminal

Note: Picom is an X11 compositor and is not compatible with Hyprland. Hyprland has its own built-in compositor with support for transparency and animations — no separate compositor is needed.

Install the tools you want

# Cmatrix
sudo pacman -S cmatrix

# Cava
sudo pacman -S cava

# Btop
sudo pacman -S btop

# Fastfetch
sudo pacman -S fastfetch

# Peaclock (AUR)
yay -S peaclock

# Cbonsai (AUR)
yay -S cbonsai

11. Common Errors & Solutions

"No space left on device" during pacstrap

Your EFI partition may be too small. Repartition and give /boot at least 512MB.

GRUB not showing after reboot

Boot from the USB, chroot back in and reinstall GRUB:

mount /dev/sda3 /mnt
mount /dev/sda1 /mnt/boot
arch-chroot /mnt
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB
grub-mkconfig -o /boot/grub/grub.cfg

No internet after reboot

sudo systemctl start NetworkManager
sudo systemctl enable NetworkManager
nmtui

Hyprland fails to start

Make sure your GPU drivers are installed:

# AMD
sudo pacman -S mesa vulkan-radeon

# NVIDIA
sudo pacman -S nvidia nvidia-utils

# Intel
sudo pacman -S mesa vulkan-intel

Black screen after login

  • Verify that xdg-desktop-portal and xdg-desktop-portal-hyprland are both installed
  • Make sure you are booting in UEFI mode
  • Check GPU drivers are installed (see above)

License

MIT

About

Arch Linux with Hyprland installation guide.

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors