link

Arch Linux Installation Guide

Prerequisite

Network Configuration

Booting & Partition

timedatectl set-ntp true
fdisk -l # list all partitions
fdisk /dev/device # e.g.: /dev/sda, /dev/nvme0n1

Partition a swap if the PC has low RAM (swap's size should be 2x RAM)

3. `w`: write table to disk and exit
4. `q`: quit without saving changes
mkfs.fat -F 32 /dev/EFI_Partition
mkswap /dev/SWAP_Partition
mkfs.ext4 /dev/ROOT_and_HOME
swapon /dev/SWAP_Partition
mount /dev/ROOT /mnt
mount /dev/HOME /mnt/home
mount --mkdir /dev/EFI /mnt/boot    // for the EFI file system
pacstrap /mnt base linux linux-firmware base base-devel # ...
genfstab -U /mnt >> /mnt/etc/fstab

arch-chroot and root configuration

I highly recommend install fish shell of out-of-the-box suggestions.

pacman -S fish
chsh root
# New shell: /usr/bin/fish
ln -sf /usr/share/zoneinfo/REGION/CITY /etc/localtime
hwclock --systohc
locale-gen
LANG=en_CA.UTF-8
mkinitcpio -P # using all presets, see `man mkinitcpio` for more
useradd -m myUser # `-m` create a folder in /home/myUser
passwd myUser # to set password
usermod -aG wheel,audio,video,optical,storage myUser

later on, groups like docker for Docker dev, or uucp for embedded (Arduino) are also required

pacman -S sudo
EDITOR=nvim visudo # visudo uses vi by default, but you can specify your preferred text editor
%wheel ALL = (ALL) ALL
# %wheel ALL = (ALL) NOPASSWD: ALL
pacman -S efitbootmgr os-prober grub
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB –recheck
grub-mkconfig -o /boot/grub/grub.cfg
exit # Ctrl + D
umount -a /mnt # unmount all

Source