Daniel's guide to installing Arch Linux
Initial steps
First set the font and keyboard layout
loadkeys dk
setfont drdos8x16
Using WiFi (optional)
If you are setting up arch on WiFi you will need to connect to a WiFi network using the iwctl command
iwctl
device list
Now you need to find your WiFi network
station wlan0 scan
station wlan0 get-networks
And then connect to it
station wlan0 connect [WiFi name]
Important
Activating NTP
It is important to activate automatic network time synchronization otherwise later steps will not work
timedatectl set-ntp true
Partitioning disks
First you need to find your disk depending on what type of disk it is it might have a different name
fdisk -l
fdisk [disk name] -l
Now you know what the disk is named so now you can begin partitioning if prompted about label type choose gpt
cfdisk [disk name]
Now you need to create two or three partitions one that is 500M EFI system, a linux filesystem that will be your main storage and optionally you can make a linux swap partition
500M EFI system
Linux filesystem
Linux swap
Now you can move onto the next step in the partitioning remember each partition has a name that is important to remember write the changes to your disk and exit the menu
mkfs.fat -F32 [EFI partition name]
mkfs.ext4 [filesystem partition]
mkswap [swapfile partition]
The last step of the partitioning is mounting the partition temporarily at /mnt and activating the swapfile if you made one
mount [filesystem partition] /mnt
swapon [swapfile partition]
Downloading mirrors
Now you will need to download your mirrors
cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak
reflector --download-timeout 500 --country Denmark,Germany --age 12 --protocol https --sort rate --save /etc/pacman.d/mirrorlist
Installing system
In this step you will be installing the arch system on the disk
pacman -Sy
pacstrap /mnt base base-devel linux linux-firmware sudo nano ntfs-3g networkmanager
genfstab -U /mnt >> /mnt/etc/fstab
arch-chroot /mnt
Configuring system
First you will configure the timezone first find the right timezone and the set it using the second command
ls /usr/share/zoneinfo
ln -sf /usr/share/zoneinfo/Europe/Copenhagen /etc/localtime
In this step you will be configuring the language of the system go to the following file and uncomment the languages you want
nano /etc/locale.gen
locale-gen
Now you will configure the keyboard layout go to the file below and add KEYMAP=dk
nano /etc/console.conf
Then you need to configure network settings go to the file below and add 127.0.1.1 [COMPUTER NAME]
nano /etc/hosts
pacman -S networkmanager
systemctl enable NetworkManager
Adding users
first add a root password
passwd
Then add a user if you don't want them to have root permissions then don't include wheel
useradd -m -G wheel [username]
passwd [username]
Now give wheel users permission to use sudo by going to the file below and uncommenting %wheel ALL=(ALL:ALL) ALL
nano /etc/sudoers
Installing microcode
Make sure you install the right microcode depending on the cpu you have
pacman -S amd-ucode
pacman -S intel-ucode
Installing grub as a bootmanager
First install grub
pacman -S grub efibootmgr
If you are dual booting operating systems make sure to follow this step (optional)
pacman -S os-prober
Now setup grub
mkdir /boot/efi
mount [EFI partition name] /boot/efi
grub-install --target=x86_64-efi --bootloader-id=grub
If you are dual booting operating systems you will also have to activate os prober that you downloaded earlier by going to the file below and uncommenting GRUB_DISABLE_OS_PROBER=false
nano /etc/default/grub
Now the final step of the grub setup
grub-mkconfig -o /boot/grub/grub.cfg
Installing xorg as the windows manager
Simply install xorg using pacman
pacman -S xorg-server
Installing KDE plasma as the desktop
Depending on how big of a package you want you can install plasma desktop for a more minimal version or plasma meta to have more features from the start
pacman -S plasma-desktop
pacman -S plasma-meta
pacman -S dolphin konsole
pacman -S sddm
systemctl enable sddm
Finalization
now for the final steps of the setup
exit
umount -R /mnt
reboot