Skip to main content

From Zero to Hyprland - Your Ultimate Arch Setup

Complete step-by-step guide to installing Arch Linux using archinstall and setting up a modern Hyprland desktop environment with ML4W dotfiles

From Zero to Hyprland - Your Ultimate Arch Setup

Arch Linux Installation Guide: From Zero to Hyprland with ML4W Dotfiles

Introduction

Arch Linux is a lightweight, flexible Linux distribution known for its rolling release model and DIY (Do It Yourself) philosophy. This guide covers installing Arch Linux using the official archinstall script and setting up a modern desktop environment using ML4W (My Linux For Work) dotfiles for Hyprland.

Prerequisites

Before starting, ensure you have:

  • A USB drive (8GB+ recommended)
  • Internet connection
  • Basic understanding of Linux concepts
  • Backup of any important data (installation will wipe the target drive)

Step 1: Prepare Installation Media

  1. Download the latest Arch Linux ISO from archlinux.org/download

  2. Create a bootable USB drive:

    		# On Linux/Mac
    dd bs=4M if=archlinux.iso of=/dev/sdX status=progress oflag=sync
     
    # On Windows (use Rufus or similar)
    # Rufus: Select ISO, write in DD mode
    	
  3. Boot from the USB drive (usually F12, F2, or ESC during POST)

Step 2: Pre-Installation Setup

Boot into Live Environment

  • Select "Arch Linux install medium" from the boot menu
  • You'll be dropped into a root shell

Verify Boot Mode

Check if you're in UEFI or BIOS mode:

		ls /sys/firmware/efi/efivars
	

If the directory exists, you're in UEFI mode; otherwise, you're in BIOS mode. Modern systems use UEFI.

Connect to the Internet

For wired connections, it should work automatically. For wireless:

		iwctl
device list
station wlan0 scan
station wlan0 get-networks
station wlan0 connect SSID
exit
	

Update System Clock

		timedatectl set-ntp true
	

Step 3: Using archinstall

Update archinstall (Optional)

		# Update package list and archinstall if needed
pacman -Sy archinstall
	

Run the Guided Installer

		archinstall
	

Installation Steps

The guided installer will prompt you through several steps:

  1. Keyboard Layout: Select your keyboard layout (default: us)

  2. Locale: Choose your locale (e.g., en_US.UTF-8)

  3. Disk Configuration:

    • Choose partitioning method (Recommended: Use a whole disk)
    • Select disk (e.g., /dev/sda)
    • Partitioning: Ext4 for root (recommended for beginners)
  4. Base Packages: Additional packages to install (leave default for now)

  5. Network Configuration:

    • Network interface: Select your network device
    • Hostname: Choose a name for your system
    • Root password: Set a strong root password
  6. User Account:

    • Create a user account with sudo privileges
    • Set user password
  7. Profile Selection:

    • Choose a profile (Desktop environments available)
    • For ML4W setup: You can install a minimal system and add Hyprland later
  8. Audio: Select audio system (pipewire recommended)

  9. Kernels: Choose kernel (linux-zen recommended for modern hardware)

  10. Additional Packages: Add any packages you want pre-installed

  11. Install: Confirm and start installation

Post-Installation

Once installation completes:

		# The installer will show: "Installation completed successfully. You can now reboot."
reboot
	

Remove the installation media and boot into your new Arch system.

Step 4: Post-Installation Setup

Update System

		# Update package database and upgrade
sudo pacman -Syu
 
# Install essential packages
sudo pacman -S base-devel git curl wget neovim
	

Enable Multilib (for 32-bit apps on 64-bit system)

Edit /etc/pacman.conf and uncomment:

		[multilib]
Include = /etc/pacman.conf.d/mirrorlist

	

Then update:

		sudo pacman -Syu
	

Install AUR Helper (yay)

		# Clone and build yay
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
cd ..
rm -rf yay
	

Step 5: ML4W Dotfiles Setup

ML4W (My Linux For Work) provides a comprehensive Hyprland configuration with modern theming, useful utilities, and a polished desktop experience.

What are ML4W Dotfiles?

  • Hyprland WM: Dynamic tiling window manager
  • Modern UI: Material design themes with wallpaper-adaptive colors
  • Full Desktop Environment: Waybar, Rofi, Kitty terminal, and more
  • Customization: Easy-to-modify configuration files
  • Multi-distro Support: Works on Arch, Fedora, and openSUSE

Installation Options

  1. Install the Dotfiles Installer app:

    		# From Flathub
    flatpak install flathub com.github.mylinuxforwork.dotfilesinstaller
    	
  2. Launch Dotfiles Installer

  3. Enter the installation URL:

    • Stable Release: https://raw.githubusercontent.com/mylinuxforwork/dotfiles/main/hyprland-dotfiles-stable.dotinst
    • Rolling Release: https://raw.githubusercontent.com/mylinuxforwork/dotfiles/main/hyprland-dotfiles.dotinst
  4. Follow the installer prompts

Option 2: Manual Installation

  1. Install dependencies:

    		# Install setup script for Arch
    wget https://raw.githubusercontent.com/mylinuxforwork/dotfiles/main/setup-arch.sh
    chmod +x setup-arch.sh
    ./setup-arch.sh
    	
  2. Clone and install dotfiles:

    		git clone https://github.com/mylinuxforwork/dotfiles.git
    cd dotfiles
    ./install.sh
    	

First Boot with ML4W

After installation:

  1. Log out of your current session
  2. Select "Hyprland" from the login manager (SDDM)
  3. First login will show the welcome screen
  4. Follow initial setup prompts

Key Features of ML4W Setup

Desktop Components

  • Hyprland: Modern Wayland compositor with dynamic tiling
  • Waybar: Highly customizable status bar
  • Rofi: Application launcher and window switcher
  • Kitty: Fast, GPU-accelerated terminal
  • Dunst: Notification daemon
  • Swaylock: Screen locker

Utilities Included

  • ML4W Apps: Custom settings apps for easy configuration
  • Wallpaper Engine: Dynamic wallpaper changer with theme adaptation
  • Sidepad: Note-taking application
  • HyprPicker: Color picker
  • Hyprshot: Screenshot utility

Theming

  • Material Design: Consistent theming across all components
  • Wallpaper-Adaptive Colors: Colors automatically match your wallpaper
  • Dark/Light Themes: Full support for both themes
  • Custom Themes: Easy theme creation and switching

Customization

Configuration Files Location

  • Main config: ~/.config/hypr/
  • Scripts: ~/.config/hypr/scripts/
  • Wallpapers: ~/wallpaper/

Key Bindings (Default)

  • Super + Q: Close window
  • Super + Return: Open terminal
  • Super + D: Application launcher (Rofi)
  • Super + Tab: Window switcher
  • Super + Shift + E: Logout menu

Customizing Themes

  1. Open ML4W Settings (ml4w-hyprland-settings)
  2. Navigate to Themes section
  3. Select wallpaper and theme combination
  4. Colors automatically adapt

Troubleshooting Common Issues

Display Issues

		# Check Hyprland logs
hyprctl monitors
hyprctl workspaces
	

Package Updates

		# Update ML4W dotfiles
cd ~/dotfiles
git pull
./install.sh
	

Performance Tuning

  • Edit ~/.config/hypr/hyprland.conf for performance settings
  • Adjust animations and effects in the settings app

Troubleshooting Installation Issues

Boot Issues

If the system doesn't boot after installation:

  1. Boot from the installation media
  2. Mount your partitions:
    		mount /dev/sdXY /mnt  # Replace with your root partition
    mount /dev/sdXZ /mnt/boot/efi  # Replace with your EFI partition
    	
  3. Chroot into the system:
    		arch-chroot /mnt
    	
  4. Reinstall and reconfigure GRUB:
    		grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB
    grub-mkconfig -o /boot/grub/grub.cfg
    	

Network Issues

If networking doesn't work after installation:

		sudo systemctl restart NetworkManager
sudo systemctl enable NetworkManager
	

Testing in a Virtual Machine

Before installing Arch on physical hardware, it's highly recommended to test the process in a virtual machine. This allows you to practice without risk and troubleshoot issues in a safe environment.

1. Install Virtualization Software

On an existing Arch Linux system:

		sudo pacman -S qemu-full virt-manager libvirt edk2-ovmf dnsmasq bridge-utils
	

On other Linux distributions, install QEMU/KVM and virt-manager through your package manager.

2. Start and Enable libvirt Service

		sudo systemctl enable --now libvirtd.service
	

3. Add Your User to the libvirt Group

		sudo usermod -aG libvirt $(whoami)
	

Log out and back in for this change to take effect.

4. Create a Virtual Machine

  1. Launch Virtual Machine Manager:

    		virt-manager
    	
  2. Click "Create a new virtual machine"

  3. Select "Local install media (ISO image or CDROM)" and click "Forward"

  4. Browse and select your downloaded Arch Linux ISO

  5. Allocate resources:

    • Memory: At least 2048 MB (2GB) recommended
    • CPUs: At least 2 cores recommended
  6. Create a virtual disk:

    • At least 20GB recommended for testing
  7. Name your VM (e.g., "Arch-Test") and check "Customize configuration before install"

  8. In the customization window:

    • Under "Boot Options", ensure "Enable boot menu" is checked
    • Under "Processor", set "Configuration" to "Copy host CPU configuration"
    • Under "SATA Disk 1", change "Disk bus" to "VirtIO" for better performance
  9. Click "Begin Installation"

5. Test Your Installation

Once the VM boots into the Arch Linux live environment, follow the installation steps from this guide. The virtual disk will likely appear as /dev/vda if you used VirtIO.

6. Taking Snapshots

One major advantage of testing in a VM is the ability to take snapshots:

  1. Before running the installation, shut down the VM
  2. In virt-manager, right-click on the VM and select "Take Snapshot"
  3. Name your snapshot (e.g., "Before-Installation")
  4. Start the VM again and proceed with testing
  5. If something goes wrong, you can revert to the snapshot

7. Debugging Tips

  • If something fails, check the error messages carefully
  • You can switch to different TTYs with Ctrl+Alt+F1 through F6
  • Review logs with journalctl -b to see boot messages
  • Take your time and read error messages - they usually tell you what went wrong

Alternative Installation Methods

Using Other Tools

  • Archinstall Profiles: Pre-configured setups during installation
  • Manual Installation: Follow the Arch Wiki for complete control
  • Archinstall Scripted: Use archinstall with configuration files for automation
  • Bash Script Installation: Create custom bash scripts for automated installations (for advanced users who want full control over the installation process)

Other Hyprland Configurations

  • Hyprdots: Another popular Hyprland configuration
  • JaKooLit: Minimal Hyprland setup
  • Custom: Build your own from scratch

Resources and Documentation

Official Documentation

Community Support

Conclusion

This guide provides a complete path from Arch Linux installation to a fully functional, modern desktop environment. The combination of archinstall for system setup and ML4W dotfiles for desktop configuration offers an excellent balance of ease and customization.

For beginners, the guided approach ensures success while providing learning opportunities. Advanced users can customize every aspect to match their workflow.

Remember: Arch Linux requires regular system maintenance. Keep your system updated and learn to troubleshoot issues independently - that's the Arch way!