Skip to content

Instantly share code, notes, and snippets.

@al-swaiti
Last active August 20, 2025 22:53
Show Gist options
  • Save al-swaiti/4f7a8fbcbb3baeda5ffd5c5cde525654 to your computer and use it in GitHub Desktop.
Save al-swaiti/4f7a8fbcbb3baeda5ffd5c5cde525654 to your computer and use it in GitHub Desktop.
arch linux btrfs -grub

Arch Linux Installation Guide for Hyprland

Author: Abdallah Alswaiti
Last Updated: August 2025

Table of Contents

  1. Download and USB Creation
  2. Boot and Preparation
  3. Base Installation
  4. Configuration
  5. Post-Installation

Download and USB Creation

1. Download Arch Linux ISO

Visit the official Arch Linux download page:

2. Create Bootable USB

Windows (Rufus):

  • Download Rufus from https://rufus.ie/
  • Select USB drive, choose ISO, set GPT/UEFI, click START

Linux/macOS (dd command):

# Find USB device
lsblk

# Write ISO to USB (replace sdX with your device)
sudo dd if=archlinux-*.iso of=/dev/sdX bs=4M status=progress oflag=sync

3. Boot Settings

  • Enable UEFI mode
  • Disable Secure Boot
  • Boot from USB drive

Boot and Preparation

Load Keyboard Layout

Choose ONE command based on your keyboard:

# Skip this step if you have US English keyboard (default)

# For German keyboard:
loadkeys de-latin1

# For French keyboard:
loadkeys fr

# For Spanish keyboard:
loadkeys es

# For Arabic keyboard:
loadkeys us  # Use US layout during installation, Arabic will be configured later

# To see all available layouts:
localectl list-keymaps | less

Connect to WLAN

If not using LAN connection:

iwctl --passphrase [password] station wlan0 connect [network]

Check Internet Connection

ping -c4 www.archlinux.org

List Hard Drives

lsblk

Create Partitions

⚠️ WARNING: This will erase all data on your drive!
تحذير: هذا سيمحو جميع البيانات على القرص الصلب!

# Open partition tool for your drive (replace sda with your drive)
gdisk /dev/sda

Step-by-Step Partitioning Process:
عملية التقسيم خطوة بخطوة:

  1. Create new partition table:

    Command: o
    Press: Enter
    This will create a new empty GUID partition table
    هذا ينشئ جدول أقسام جديد وفارغ
    
  2. Create EFI partition (512MB):

    Command: n
    Partition number (1-128, default 1): 1
    First sector: Press Enter (use default)
    Last sector: +512M
    Hex code or GUID: ef00
    
    This creates the boot partition / ينشئ قسم الإقلاع
    
  3. Create Root partition (remaining space):

    Command: n  
    Partition number (1-128, default 2): 2
    First sector: Press Enter (use default)
    Last sector: Press Enter (use all remaining space)
    Hex code or GUID: 8300
    
    This creates the system partition / ينشئ قسم النظام
    
  4. Review your partitions:

    Command: p
    This shows your partition table / يعرض جدول الأقسام
    
    You should see:
    Number  Start   End     Size    Code  Name
    1       xxxx    xxxx    512.0M  EF00  EFI System
    2       xxxx    xxxx    xx.xG   8300  Linux filesystem
    
  5. Save changes:

    Command: w
    Do you want to proceed? (Y/N): Y
    
    This writes changes to disk / يحفظ التغييرات على القرص
    

After partitioning, verify with:

lsblk
# You should see something like:
# sda      8:0    0  100G  0 disk 
# ├─sda1   8:1    0  512M  0 part     <- EFI partition
# └─sda2   8:2    0 99.5G  0 part     <- Root partition

Sync Packages

pacman -Syy

Base Installation

Sync Time

timedatectl set-ntp true

Format Partitions

Replace [EFI] and [ROOT] with your partitions shown with lsblk:

mkfs.fat -F 32 /dev/[EFI]
mkfs.btrfs -f /dev/[ROOT]

Mount Points for Btrfs

mount /dev/[ROOT] /mnt
btrfs su cr /mnt/@
btrfs su cr /mnt/@cache
btrfs su cr /mnt/@home
btrfs su cr /mnt/@snapshots
btrfs su cr /mnt/@log
umount /mnt

Btrfs Configuration

mount -o compress=zstd:1,noatime,subvol=@ /dev/[ROOT] /mnt
mkdir -p /mnt/{boot/efi,home,.snapshots,var/{cache,log}}
mount -o compress=zstd:1,noatime,subvol=@cache /dev/[ROOT] /mnt/var/cache
mount -o compress=zstd:1,noatime,subvol=@home /dev/[ROOT] /mnt/home
mount -o compress=zstd:1,noatime,subvol=@log /dev/[ROOT] /mnt/var/log
mount -o compress=zstd:1,noatime,subvol=@snapshots /dev/[ROOT] /mnt/.snapshots
mount /dev/[EFI] /mnt/boot/efi

Install Base Packages

Choose based on your processor type:

# Step 1: Check your processor type first
lscpu | grep "Model name"

# Step 2: Install base packages (choose ONE command):

# For AMD processors (Ryzen, FX, etc.):
pacstrap -K /mnt base base-devel git linux linux-firmware vim openssh reflector rsync amd-ucode

# For Intel processors (Core i3/i5/i7/i9, Celeron, etc.):
pacstrap -K /mnt base base-devel git linux linux-firmware vim openssh reflector rsync intel-ucode

Generate fstab

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

Chroot to Installed System

arch-chroot /mnt

Configuration

Set System Time

Find and set your timezone:

# Step 1: Find your timezone
timedatectl list-timezones | grep -i america    # For Americas
timedatectl list-timezones | grep -i europe     # For Europe  
timedatectl list-timezones | grep -i asia       # For Asia/Middle East
timedatectl list-timezones | grep -i africa     # For Africa

# Step 2: Set your timezone (choose ONE):
ln -sf /usr/share/zoneinfo/America/New_York /etc/localtime      # US Eastern
ln -sf /usr/share/zoneinfo/Europe/London /etc/localtime        # UK
ln -sf /usr/share/zoneinfo/Asia/Riyadh /etc/localtime          # Saudi Arabia
ln -sf /usr/share/zoneinfo/Asia/Dubai /etc/localtime           # UAE
ln -sf /usr/share/zoneinfo/Africa/Cairo /etc/localtime         # Egypt
ln -sf /usr/share/zoneinfo/Asia/Baghdad /etc/localtime         # Iraq
ln -sf /usr/share/zoneinfo/Asia/Amman /etc/localtime           # Jordan
ln -sf /usr/share/zoneinfo/Asia/Beirut /etc/localtime          # Lebanon
ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime        # Germany

# Step 3: Set hardware clock
hwclock --systohc

Update Reflector

Choose the country closest to you for faster downloads:

# Middle East / Arab countries (choose ONE):
reflector -c "United Arab Emirates," -p https -a 3 --sort rate --save /etc/pacman.d/mirrorlist
# OR
reflector -c "Germany," -p https -a 3 --sort rate --save /etc/pacman.d/mirrorlist  # Good for Middle East

# Other regions:
# reflector -c "United States," -p https -a 3 --sort rate --save /etc/pacman.d/mirrorlist
# reflector -c "United Kingdom," -p https -a 3 --sort rate --save /etc/pacman.d/mirrorlist  
# reflector -c "France," -p https -a 3 --sort rate --save /etc/pacman.d/mirrorlist
# reflector -c "Canada," -p https -a 3 --sort rate --save /etc/pacman.d/mirrorlist

Synchronize Mirrors

pacman -Syy

Install Packages

pacman --noconfirm -S grub xdg-desktop-portal-wlr efibootmgr networkmanager network-manager-applet dialog wpa_supplicant mtools dosfstools base-devel linux-headers avahi xdg-user-dirs xdg-utils gvfs gvfs-smb nfs-utils inetutils dnsutils bluez bluez-utils cups hplip alsa-utils pipewire pipewire-alsa pipewire-pulse pipewire-jack bash-completion openssh rsync reflector acpi acpi_call dnsmasq openbsd-netcat ipset firewalld flatpak sof-firmware nss-mdns acpid os-prober ntfs-3g terminus-font exa bat htop ranger zip unzip neofetch duf xorg xorg-xinit xclip grub-btrfs xf86-video-amdgpu xf86-video-nouveau xf86-video-intel xf86-video-qxl brightnessctl pacman-contrib

Set Language and Locale

Choose your system language (run ONE set of commands):

For English (Recommended - most software support):

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

For Arabic (العربية):

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

For other languages:

# German
# echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
# echo "de_DE.UTF-8 UTF-8" >> /etc/locale.gen
# locale-gen
# echo "LANG=de_DE.UTF-8" >> /etc/locale.conf

# French
# echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen  
# echo "fr_FR.UTF-8 UTF-8" >> /etc/locale.gen
# locale-gen
# echo "LANG=fr_FR.UTF-8" >> /etc/locale.conf

Set Console Keyboard and Font

Choose ONE keyboard layout:

# Set console font (always run this)
echo "FONT=ter-v18n" >> /etc/vconsole.conf

# Choose your keyboard (run ONE line only):
echo "KEYMAP=us" >> /etc/vconsole.conf           # US English keyboard
# echo "KEYMAP=de-latin1" >> /etc/vconsole.conf  # German keyboard  
# echo "KEYMAP=fr" >> /etc/vconsole.conf         # French keyboard
# echo "KEYMAP=es" >> /etc/vconsole.conf         # Spanish keyboard

# Note: Arabic keyboard layout will be configured in desktop environment

Set Hostname and Localhost

echo "arch" >> /etc/hostname
echo "127.0.0.1 localhost" >> /etc/hosts
echo "::1 localhost" >> /etc/hosts
echo "127.0.1.1 arch.localdomain arch" >> /etc/hosts

Set Root Password

passwd root

Add User

Replace [USERNAME] with your desired username:

useradd -m -G wheel [USERNAME]
passwd [USERNAME]

Enable Services

systemctl enable NetworkManager
systemctl enable bluetooth
systemctl enable cups.service
systemctl enable sshd
systemctl enable avahi-daemon
systemctl enable reflector.timer
systemctl enable fstrim.timer
systemctl enable firewalld
systemctl enable acpid

Grub Installation

grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB --removable
grub-mkconfig -o /boot/grub/grub.cfg

Add Btrfs and Setfont to Mkinitcpio

# Before: BINARIES=()
# After: BINARIES=(btrfs setfont)
sed -i 's/BINARIES=()/BINARIES=(btrfs setfont)/g' /etc/mkinitcpio.conf
mkinitcpio -p linux

Configure Sudo Access

Add user to wheel group and enable sudo:

# Uncomment %wheel ALL=(ALL:ALL) ALL line
EDITOR=vim sudo -E visudo
usermod -aG wheel [USERNAME]

Restart System

exit
shutdown -h now

Post-Installation

First Boot Setup

  1. Remove installation USB
  2. Boot into your new Arch Linux system
  3. Login with your created user account

Install Hyprland and Essential Packages

# Update system first
sudo pacman -Syu

# Install Hyprland and desktop components
sudo pacman -S hyprland kitty thunar firefox wofi waybar mako grim slurp wl-clipboard

# Install dependencies for End-4 dots
sudo pacman -S git base-devel yay npm nodejs python python-pip
sudo pacman -S ttf-jetbrains-mono-nerd ttf-nerd-fonts-symbols-mono
sudo pacman -S brightnessctl playerctl pamixer

# Install Arabic fonts and input support
sudo pacman -S noto-fonts noto-fonts-extra ttf-liberation ttf-dejavu
sudo pacman -S ibus ibus-m17n m17n-lib m17n-db

# Optional: Install Arabic-specific fonts
sudo pacman -S ttf-amiri ttf-scheherazade-new

Install End-4 Dots Hyprland Configuration

# Clone the End-4 dots repository
git clone --depth=1 https://github.com/end-4/dots-hyprland.git ~/dots-hyprland

# Navigate to the repository
cd ~/dots-hyprland

# Run the installation script
chmod +x install.sh
./install.sh

# Follow the installation prompts and select your preferences

Alternative Manual Installation

# If automatic installation doesn't work, install manually:

# Install yay (AUR helper) first
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
cd ..

# Install End-4 dependencies from AUR
yay -S aylurs-gtk-shell-git
yay -S hyprpicker-git
yay -S swww

# Copy configuration files
cp -r ~/dots-hyprland/.config/* ~/.config/

Configure Arabic Input (After First Boot)

# Add to your shell profile (~/.bashrc or ~/.zshrc)
export GTK_IM_MODULE=ibus
export XMODIFIERS=@im=ibus  
export QT_IM_MODULE=ibus

# Start ibus daemon
ibus-daemon -drx

# Configure Arabic keyboard in ibus-setup
ibus-setup

Arabic Desktop Environment Setup

# Set Arabic locale for specific applications (optional)
export LC_TIME=ar_SA.UTF-8           # Arabic date/time format
export LC_NUMERIC=ar_SA.UTF-8        # Arabic number format

# For right-to-left text support in terminal
sudo pacman -S bidi

ML4W Dotfiles (Optional)

For Stephan Raabe's complete Hyprland setup:

# Clone ML4W dotfiles
git clone https://gitlab.com/stephan-raabe/dotfiles.git ~/dotfiles

# Run installation script
cd ~/dotfiles
./install.sh

Configure Hyprland with End-4 Dots

# The End-4 installation script will configure:
# - Hyprland window manager settings
# - AGS (Aylur's Gtk Shell) widgets and bars
# - Beautiful animations and effects  
# - Modern wallpapers and themes
# - Optimized keybindings

# Start Hyprland (after reboot)
# Type 'Hyprland' in TTY or use display manager

# Key features of End-4 dots:
# - Super + Enter: Open terminal
# - Super + D: Application launcher
# - Super + Q: Close window
# - Super + F: Fullscreen
# - Super + Numbers: Switch workspaces

Audio Setup

Enable PipeWire for the user:

systemctl --user enable --now pipewire pipewire-pulse

Key Features of End-4 Dots

This installation uses End-4's modern Hyprland configuration which provides:

  • Modern Desktop Experience with beautiful animations and effects
  • AGS (Aylur's Gtk Shell) for advanced widgets and customizable bars
  • Dynamic Wallpapers with automatic changing
  • Optimized Performance with smooth 60fps animations
  • Beautiful Themes with consistent color schemes
  • Advanced Features like blur effects, rounded corners, and transparency
  • Arabic Language Support fully integrated

Troubleshooting End-4 Dots

Installation Issues

# If installation fails, check dependencies:
sudo pacman -S base-devel git nodejs npm python python-pip

# Manually install AUR dependencies:
yay -S aylurs-gtk-shell-git hyprpicker-git swww

# Re-run installation:
cd ~/dots-hyprland
./install.sh

Configuration Problems

# Reset to default Hyprland config if needed:
cp /usr/share/hyprland/hyprland.conf ~/.config/hypr/

# Check Hyprland logs:
hyprctl logs

# Restart Hyprland:
pkill Hyprland && Hyprland

Notes

What You Need to Know:

Placeholders to Replace:

  • [EFI] = your EFI partition → usually /dev/sda1
  • [ROOT] = your root partition → usually /dev/sda2
  • [USERNAME] = choose your username → example: ahmed, sara, omar

Processor Types:

  • AMD: Ryzen 3/5/7/9, FX series, A-series → use amd-ucode
  • Intel: Core i3/i5/i7/i9, Celeron, Pentium → use intel-ucode

For Arab Users:

  • Language: Use English system language for better software compatibility
  • Arabic Support: Will be added after installation with fonts and input methods
  • Timezone: Choose your country's timezone from the list provided
  • Mirrors: Use UAE or Germany mirrors for faster downloads in Middle East

Important Steps:

  1. Don't skip the processor type selection
  2. Choose only ONE option in each section
  3. Replace ALL placeholders with your actual values
  4. Remember your username and password

Keyboard Layouts:

  • Installation uses US keyboard layout
  • Arabic keyboard will be configured in desktop environment
  • Physical keyboard can be any layout

Author: Abdallah Alswaiti
Professional Arch Linux Installation Guide for Hyprland Desktop Environment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment