This guide walks through the steps to install Arch Linux, configure SSH, set up partitions, install essential packages, and finalize system setup.
Ensure your system has internet access.
ping archlinux.org
Before proceeding, check if SSH is running and find your IP address.
systemctl status sshd
ip a
List available disks and start partitioning.
fdisk -l
fdisk /dev/nvme0n1
# or
# cfdisk /dev/nvme0n1
Format the partitions appropriately.
mkfs.fat -F 32 /dev/nvme0n1p1
mkswap /dev/nvme0n1p2
mkfs.ext4 /dev/nvme0n1p3
Enable swap and mount root partition.
swapon /dev/nvme0n1p2
mount /dev/nvme0n1p3 /mnt
Select a faster mirror for package downloads.
sudo reflector --save /etc/pacman.d/mirrorlist --sort rate --verbose -l 100 -n 5 -p https
Download and install the base system and essential packages.
pacstrap -K /mnt base base-devel linux-lts linux-firmware intel-ucode networkmanager neovim
Create the fstab file for mounting partitions automatically.
genfstab -U /mnt >> /mnt/etc/fstab
arch-chroot /mnt
Set the system time zone.
ln -sf /usr/share/zoneinfo/Asia/Dhaka /etc/localtime
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 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 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
Exit chroot, unmount partitions, and reboot.
exit
umount -R /mnt
reboot
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
If using Intel graphics, install required packages.
sudo pacman -S mesa lib32-mesa vulkan-intel lib32-vulkan-intel
For virtual machine installations, install the QXL driver.
sudo pacman -S xf86-video-qxl
This completes the Arch Linux installation and initial setup.