Skip to content

Instantly share code, notes, and snippets.

@codayon
Last active May 14, 2025 10:53
Show Gist options
  • Save codayon/c2d464cfa0df787ce137a3f859fac476 to your computer and use it in GitHub Desktop.
Save codayon/c2d464cfa0df787ce137a3f859fac476 to your computer and use it in GitHub Desktop.
Arch Linux Installtion Guide

Inspiration

This guide walks through the steps to install Arch Linux, configure SSH, set up partitions, install essential packages, and finalize system setup.


Verify Internet Connection

Ensure your system has internet access.

ping archlinux.org

SSH

Before proceeding, check if SSH is running and find your IP address.

systemctl status sshd

ip a

Partition the Disk

List available disks and start partitioning.

fdisk -l

fdisk /dev/nvme0n1
# or
# cfdisk /dev/nvme0n1

Format Partitions

Format the partitions appropriately.

mkfs.fat -F 32 /dev/nvme0n1p1

mkswap /dev/nvme0n1p2

mkfs.ext4 /dev/nvme0n1p3

Mount Partitions

Enable swap and mount root partition.

swapon /dev/nvme0n1p2

mount /dev/nvme0n1p3 /mnt

Change Mirror

Select a faster mirror for package downloads.

sudo reflector --save /etc/pacman.d/mirrorlist --sort rate --verbose -l 100 -n 5 -p https

Install Base System

Download and install the base system and essential packages.

pacstrap -K /mnt base base-devel linux-lts linux-firmware intel-ucode networkmanager neovim

Generate fstab

Create the fstab file for mounting partitions automatically.

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

Chroot into the New System

arch-chroot /mnt

Set Timezone

Set the system time zone.

ln -sf /usr/share/zoneinfo/Asia/Dhaka /etc/localtime

Configure Locale

Enable necessary locales and set the system language.

nvim /etc/locale.gen

Uncomment the following line in /etc/locale.gen:

bn_BD.UTF-8 UTF-8
en_US.UTF-8 UTF-8

Then run:

locale-gen

hwclock --systohc

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

Set Hostname

Set the hostname and configure the hosts file.

echo "home" > /etc/hostname

nvim /etc/hosts

Add the following lines to /etc/hosts:

127.0.0.1 localhost
::1       localhost
127.0.1.1 home
passwd

Install Bootloader

Install and configure GRUB for EFI.

pacman -S grub efibootmgr

mount --mkdir /dev/nvme0n1p1 /boot/efi

grub-install --target=x86_64-efi -efi-directory=/boot/efi --bootloader-id=GRUB

grub-mkconfig -o /boot/grub/grub.cfg

systemctl enable NetworkManager

Final Steps

Exit chroot, unmount partitions, and reboot.

exit

umount -R /mnt

reboot

Create a User

Set up a new user with necessary permissions.

useradd -mG wheel,audio,video,storage -s /bin/bash ayon

nvim /etc/sudoers

Uncomment the following line in the sudoers file:

# %wheel ALL=(ALL:ALL) ALL
passwd ayon

Install Intel Graphics Drivers

If using Intel graphics, install required packages.

sudo pacman -S mesa lib32-mesa vulkan-intel lib32-vulkan-intel

Install QEMU Graphics Driver

For virtual machine installations, install the QXL driver.

sudo pacman -S xf86-video-qxl

This completes the Arch Linux installation and initial setup.

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