Skip to content

pinapel-dev123/arch-linux-installation-guide

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

🚀 Arch Linux Installation Guide

Arch Linux License: MIT Maintenance

A comprehensive, minimal, and straightforward guide to installing Arch Linux with UEFI, GRUB, and a complete Desktop Environment.


Prerequisites

Before starting the installation, ensure your system meets the following requirements:

Hardware Requirements

  • Processor: x86-64 (64-bit) compatible CPU.
  • RAM: Minimum 1 GiB (2 GiB or more recommended for Desktop Environments).
  • Storage: At least 20 GiB of free space (40 GiB or more recommended for daily use).
  • GPU: Integrated or dedicated Intel, AMD, or Nvidia graphics card.

System Settings

  • Boot Mode: UEFI must be enabled in your BIOS/UEFI settings (Legacy/CSM is not covered in this guide).
  • Secure Boot: Disabled in BIOS/UEFI.
  • SATA Mode: Set to AHCI (instead of RAID) in BIOS/UEFI.

Other Essentials

  • A bootable USB flash drive (minimum 4 GiB) containing the latest Arch Linux ISO.
  • A stable internet connection (Ethernet cable or Wi-Fi).

1. Pre-Installation

Verify Boot Mode

Ensure your system is booted in UEFI mode:

ls /sys/firmware/efi/efivars

Connect to the Internet

If using Wi-Fi, run:

iwctl

Verify your connection:

ping archlinux.org

Update System Clock

timedatectl set-ntp true

2. Partition the Disks

Identify your drive using fdisk -l or lsblk. Then open the disk layout tool (replace sdX with your actual drive):

cfdisk /dev/sdX

Select gpt label type and create the following partition scheme:

  • EFI Partition: 1 GiB (Type: EFI System)
  • Swap Partition: 4 GiB to 8 GiB (Type: Linux swap)
  • Root Partition: Remaining space (Type: Linux root)

Format Partitions

# Format EFI Partition
mkfs.vfat -F 32 /dev/sdX1

# Initialize Swap
mkswap /dev/sdX2
swapon /dev/sdX2

# Format Root Partition
mkfs.ext4 /dev/sdX3

Mount Filesystems

mount /dev/sdX3 /mnt
mount --mkdir /dev/sdX1 /mnt/boot

3. Installation

Install Essential Packages

pacstrap -K /mnt base linux linux-firmware nano sudo networkmanager git base-devel bluez bluez-utils

Fstab

Generate the filesystem table file:

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

4. Configure the System

Chroot into the new system:

arch-chroot /mnt

Time Zone

Set your local time zone (replace Region/City with your own, e.g., Asia/Jakarta):

ln -sf /usr/share/zoneinfo/Region/City /etc/localtime
hwclock --systohc

Localization

Edit /etc/locale.gen and uncomment en_US.UTF-8 UTF-8. Then generate the locale:

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

Network Configuration

Create the hostname file (replace myhostname with your desired name):

echo "myhostname" > /etc/hostname

Enable the NetworkManager service:

systemctl enable NetworkManager

Root Password

Set the root password:

passwd

5. Advanced Post-Installation (Inside Chroot)

Create a New User

Create a new user with sudo privileges (replace myusername with your own name):

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

Allow members of group wheel to use sudo. Edit the sudoers file:

EDITOR=nano visudo

Uncomment this line (remove the # symbol):

%wheel ALL=(ALL:ALL) ALL

Install Graphics Drivers

Install the driver that matches your GPU:

# For Intel Graphics
pacman -S xf86-video-intel

# For AMD Graphics
pacman -S xf86-video-amdgpu

# For Nvidia (Modern cards)
pacman -S nvidia nvidia-utils

Install Audio Driver (PipeWire)

pacman -S pipewire pipewire-alsa pipewire-pulse pipewire-jack wireplumber

Enable Bluetooth Service

systemctl enable bluetooth

Install a Desktop Environment

Choose ONE of the popular desktop environments below:

Option A: GNOME

pacman -S gnome gnome-extra gdm
systemctl enable gdm

Option B: KDE Plasma

pacman -S plasma-desktop sddm kde-applications
systemctl enable sddm

6. Boot Loader Installation

Install GRUB to the boot directory:

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

7. Reboot

Exit the chroot environment, unmount partitions, and reboot:

exit
umount -R /mnt
reboot

8. Post-Reboot Configurations

After rebooting, remove your installation media, log in as your normal user (not root), and open a terminal.

Install AUR Helper (Yay)

Clone the repository and compile the package:

git clone https://archlinux.org
cd yay
makepkg -si
cd .. && rm -rf yay

Managing Dotfiles

If you want to manage your configuration files (dotfiles), the easiest way is using stow:

# Install GNU Stow
sudo pacman -S stow

# Example setup: 
# 1. Create a dotfiles directory
mkdir ~/dotfiles && cd ~/dotfiles

# 2. Move a config folder inside it
mkdir nvim && mv ~/.config/nvim ~/dotfiles/nvim/

# 3. Symlink it back automatically
stow nvim

9. Troubleshooting

Issue 1: No Internet Connection After Reboot

If your Wi-Fi or Ethernet is not working after booting into the installed system:

# Check if NetworkManager is running
sudo systemctl status NetworkManager

# If it is stopped, start and enable it
sudo systemctl enable --now NetworkManager

Issue 2: Screen Freezes or Black Screen (Nvidia Users)

If you encounter a black screen after installing Nvidia drivers, you may need to enable Modesetting.

# Edit the GRUB configuration file
sudo nano /etc/default/grub

# Find the line GRUB_CMDLINE_LINUX_DEFAULT and add nvidia-drm.modeset=1
GRUB_CMDLINE_LINUX_DEFAULT="nvidia-drm.modeset=1 quiet splash"

# Regenerate GRUB config
sudo grub-mkconfig -o /boot/grub/grub.cfg

Issue 3: Bluetooth Devices Cannot Connect

If the Bluetooth manager opens but cannot find devices:

# Check if the bluetooth module is blocked
rfkill list

# If blocked, unblock it
sudo rfkill unblock bluetooth

# Start the bluetooth service
sudo systemctl enable --now bluetooth

About

a guide for arch linux installation

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors