Arch Install Guide
created
feb 09 26
last modified
mar 26 26
tags
#linux,
#tech
1. Initial Setup
- User:
root - Password: (Set during install)
- Internet: Connect via Ethernet or use
iwctlfor Wi-Fi. verify withping archlinux.org.
2. Partitioning
Use cfdisk to prepare your drive (/dev/sda or /dev/nvme0n1).
- ESP: 512MB (EFI System Partition, type
EFI System) - Swap: 8GB or however much RAM you have (Type
Linux Swap) - Root: Remaining space (Type
Linux Filesystem)
mkfs.ext4 /dev/<root_partition>
mkfs.vfat -F 32 /dev/<esp_partition>
mkswap /dev/<swap_partition>
swapon /dev/<swap_partition>
mount /dev/<root_partition> /mnt
mount --mkdir /dev/<esp_partition> /mnt/boot
3. Base Installation
Enable ParallelDownloads in /etc/pacman.conf for speed before running pacstrap.
pacstrap -K /mnt base base-devel linux linux-firmware neovim grub efibootmgr networkmanager opendoas git man-db
genfstab -U /mnt >> /mnt/etc/fstab
arch-chroot /mnt
4. System Configuration
Localization
ln -sf /usr/share/zoneinfo/Asia/Hong_Kong /etc/localtime
hwclock --systohc
# Edit /etc/locale.gen and uncomment en_US.UTF-8
locale-gen
echo "LANG=en_US.UTF-8" > /etc/locale.conf
echo "myhostname" > /etc/hostname
Users & Permissions
passwd # Set root password
useradd -m -G wheel joshua
passwd joshua
Configure doas:
nvim /etc/doas.conf
permit :wheel
permit persist :wheel
permit nopass :wheel cmd brightnessctl
permit nopass :wheel cmd poweroff
permit nopass :wheel cmd reboot
permit nopass :wheel cmd make
permit nopass :wheel cmd light
Note: Ensure sudo is removed or symlinked if you want doas to replace it completely, or simply use doas.
Network & Services
systemctl enable NetworkManager
Bootloader
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB
grub-mkconfig -o /boot/grub/grub.cfg
5. Post-Reboot
Reboot into the new system.
exit
umount -R /mnt
reboot