Arch Linux Installation Guide (as of 15.09.2020)

Search for your keyboard layout

localectl list-keymaps | grep -i search term

Load a layout

loadkeys available layout

Check for internet connection

ip a

If needed, connect to Wifi

wifi-menu

check if UEFI Mode is enabled (any output indicates it is enabled)

ls /sys/firmware/efi/efivars

See a simple partition structure

lsblk

For further information regarding the partition tables

fdisk -l

Select the device you want to install the OS on

fdisk /dev/device
Steps For UEFI Systems:

Press g to add a new empty GPT partition table.

Create a ESP partition with the command n and then press enter two times. Then I suggest using this command for the maxium possible size: +512M. Now press t and then 1 to change to type of the partition to 'EFI System'.

Create a swap partition with n and press enter two times. Now I suggest setting the file size to 1.5x the size of your RAM. For 8 GB RAM this would be: +12G. Now press t, 2 and 19 to change the partition type to 'Linux swap'.

Create the root partition with n and now press enter three times.

Write and apply the new partition table using w.

Create the filesystem for the UEFI partition

mkfs.fat -F32 /dev/partition 1
Steps For BIOS Systems:

Press g to add a new empty GPT partition table.

Create a BIOS partition with the command n and then press enter two times. Then I suggest setting the following size: +1024M. Now press t and then 4 to change to type of the partition to 'BIOS boot'.

Create a swap partition with n and press enter two times. Now I suggest setting the file size to 1.5x the size of your RAM. For 8 GB RAM this would be: +12G. Now press t, 2 and 19 to change the partition type to 'Linux swap'.

Create the root partition with n and now press enter three times.

Write and apply the new partition table using w.

Make swap

mkswap /dev/partition 2

Activate swap

swapon /dev/partition 2

Create a filesystem for the root partition

mkfs.ext4 /dev/partition 3

Sync the pacman repository so you can install packages

pacman -Syy

Install reflector to get a fast mirrorlist

pacman -S reflector

Make a backup of your default mirrorlist (just in case)

cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak

You have to change the country code, mine is "CH" (Switzerland)

reflector -c "CH" -f 12 -l 10 -n 12 --save /etc/pacman.d/mirrorlist

Mount the root partition

mount /dev/partition 2 /mnt

Install some necessary packages and a CLI text Editor (e.g. vim or nano)

pacstrap /mnt base base-devel linux linux-firmware networkmanager rsync vim

Create the fstab file

genfstab -U /mnt >> /mnt/etc/fstab

Enter the mounted disk as root user

arch-chroot /mnt

Edit this file und uncomment your format

vim /etc/locale.gen

Generate the locale config

locale-gen
echo LANG= your locale > /etc/locale.conf
export LANG=your locale

Define your host name

echo hostname > /etc/hostname

create the hosts file and edit it

vim /etc/hosts

put the following lines in this file:

127.0.0.1 localhost
::1 localhost
127.0.1.1 hostname

Setup your root password

passwd

Allow the 'wheel' group to use sudo

EDITOR=vim visudo

Now uncomment using your desired text editor:

%wheel ALL=(ALL) ALL

Add user

useradd -m -g users -G wheel username

Set user password

passwd username

Install bootloader (grub)

Steps for UEFI System:
pacman -S grub efibootmgr
mkdir /boot/efi
mount /dev/sda1 /boot/efi
grub-install --target=x86_64-efi --bootloader-id=GRUB --efi-directory=/boot/efi
grub-mkconfig -o /boot/grub/grub.cfg
Steps for BIOS System:
pacman -S grub
grub-install --target=i386-pc /dev/device
grub-mkconfig -o /boot/grub/grub.cfg

Now you should install a display server. I would recommend Xorg

pacman -S xorg

If you want, you can install an Desktop Environment. Here I install gnome

pacman -S gnome
systemctl enable gdm.service
systemctl enable NetworkManager.service

Now exit from chroot

exit

Now you are finished installing arch and you can shutdown the machine

shutdown now