Arch Linux notes

So, I decided to instal Arch Linux and recorded all the steps:

cat /sys/firmware/efi/fw_platform_size # output -> 64 (the system is booted in UEFI mode and has a 64-bit x64 UEFI)
iwctl # connect to the wifi
timedatectl # update clock

fdisk -l # see disk partitions and drives

cfdisk # good luck partitioning your drive :D
  # 1GB -> EFI System
  # 8 GB -> Linux swap
  # rest -> Linux filesystem

mkfs.fat -F 32 /dev/nvme0n1p1 # format EFI partition to FAT32
mkswap /dev/nvme0n1p2 # initialize the swap partition
mkfs.ext4 /dev/nvme0n1p3 # format the last partition to create an Ext4 filesystem

swapon /dev/nvme0n1p2 # turn on the swap
mount /dev/nvme0n1p3 /mnt # mount the root partition
mount --mkdir /dev/nvme0n1p1 /mnt/boot # mount the EFI partition

reflector --verbose --latest 5 --sort rate --save /etc/pacman.d/mirrorlist # update the mirror list to the top 5
pacstrap -K /mnt base linux linux-firmware intel-ucode vim networkmanager sof-firmware man-db # install the base system

genfstab -U /mnt >> /mnt/etc/fstab # generate filesystem table
arch-chroot /mnt # enter the new system
ln -sf /usr/share/zoneinfo/Europe/Lisbon /etc/localtime # set the timezone
hwclock --systohc # sync the hardware clock

vim /etc/locale.gen # uncomment the en_US.UTF-8 line
locale-gen # generate the locales
echo "LANG=en_US.UTF-8" > /etc/locale.conf # set the system language

echo "archinho" > /etc/hostname # set hostname, GANDA ARCHINHO
passwd # set the root password

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

useradd -m -G wheel -s /bin/bash coutinho # generate coutinho user
passwd coutinho # set password for coutinho

pacman -S sudo # install sudo
EDITOR=vim visudo # uncomment the %wheel permissions
systemctl enable NetworkManager # enable internet on startup
exit # exit chroot
umount -R /mnt # unmount the drives
reboot