Table of Contents

How to install Arch Linux

If you are having issues with this Arch Linux install DO NOT ask help in the forum, please look at THEIR wiki for more information

Loadkeys uk
fdisk -l (lists out the partitions)
fdisk /dev/sda
In fdisk, "g" for GPT
In fdisk, "n" for add new partition
n fdisk, "t" to change partition type
In fdisk, "w" (write table to disk)

Remember – +260M for EFI and +2GB for swap

mkfs.fat -F32 /dev/sda1
mkswap /dev/sda2
swapon /dev/sda2
mkfs.ext4 /dev/sda3
mount /dev/sda3 /mnt (mounts it to mnt on live image)
pacstrap /mnt base linux-lts linux-firmware
genfstab -U /mnt>> /mnt/etc/fstab

Chroot:

arch-chroot /mnt (change into root directory of our new installation)
ln -sf /usr/share/zoneinfo/REGION/CITY /etc/localtime
hwclock --systohc (sets the hardware clock)
pacman -S nano
nano /etc/locale.gen
locale-gen
nano /etc/hostname
nano /etc/hosts

Users and passwords:

passwd (set root pass)
useradd -m ‘username’ (make another user)
passwd ‘username’ (set that user's password)
usermod -aG wheel,audio,video,optical,storage ‘username’
pacman -S sudo
EDITOR=nano visudo

Add GRUB:

pacman -S grub
pacman -S efibootmgr dosfstools os-prober mtools (if doing UEFI)
mkdir /boot/EFI (if doing UEFI)
mount /dev/sda1 /boot/EFI
grub-install --target=x86_64-efi --bootloader-id=grub_uefi --recheck (if doing UEFI)
grub-mkconfig -o /boot/grub/grub.cfg

Add Networking:

pacman -S networkmanager
systemctl enable NetworkManager

Add SSH Server, make package, GIT and Firewall

sudo pacman -S openssh
systemctl enable sshd
systemctl start sshd
 
sudo pacman -S base-devel git ufw

Before Reboot:

exit the chroot by typing "exit"
umount /mnt (unmounts /mnt)
reboot (or shutdown now if doing this in VirtualbBox)

Reboot: Remember to detach the ISO in VirtualBox before reboot.

To add a desktop environment, please look at the Arch wiki for which ones are official