This is a full installation and customization guide for Arch Linux. This updated guide uses Wayland instead of X11. The theme is based off the Everforest color scheme from sainnhe.
ℹ️ If you already have a running Arch system with the necessary packets installed, you can go to the Quick Ricing section.
arch-everforest_short.mp4
Go to the download page of the official Arch Linux webpage and download the ISO image from one of the mirrors: https://archlinux.org/download/.
Check this Arch Wiki article to prepare an installation medium, e.g. a USB flash drive or an optical disc: https://wiki.archlinux.org/title/installation_guide#Prepare_an_installation_medium
Find out which keyboard layout you are using and then set it using loadkeys
:
ls /usr/share/kbd/keymaps/**/*.map.gz
loadkeys de_CH-latin1
To connect to the web we use iwctl:
To start iwctl run the following command:
iwctl
We can then look for the device name:
[iwd]# device list
Then we can use the device name to scan for networks (Note: This command won't output anything!):
[iwd]# station <device-name> scan
Now we can list all available networks:
[iwd]# station <device-name> get-networks
Finally, we connect to a network:
[iwd]# station <device-name> connect <SSID>
Check if you successfully established a connection by pinging the Google server:
ping 8.8.8.8
Set root password so you can complete installation via ssh on a working system
passwd
This step is not really necessary, but the Terminus font may appear cleaner than the default one:
setfont Lat2-Terminus16
Run the following command:
ls /sys/firmware/efi/efivars
If the command shows the directory without error, then the system is booted in UEFI mode. Else you have to use BIOS mode.
Check the name of the hard disk:
fdisk -l
Use the name (in my case sda) to start the fdisk
partitioning tool:
fdisk /dev/sda
Press g to create a new GUID Partition Table (GPT).
We will do it according to the example layout of the Arch wiki:
Mount point | Partition | Partition type | Suggested size |
---|---|---|---|
/mnt/boot | /dev/efi_system_partition | uefi | At least 300 MiB |
[SWAP] | /dev/swap_partition | swap | More than 512 MiB |
/mnt | /dev/root_partition | linux | Remainder of device |
- Press n.
- Press Enter to select the default partition number.
- Press Enter to use the default first sector.
- Enter +300M for the last sector.
- Press t and choose 1 and write uefi.
- Press n.
- Press Enter to select the default partition number.
- Press Enter to use the default first sector.
- Enter +512M for the last sector.
- Press t and choose 2 and write swap.
- Press n.
- Press Enter to select the default partition number.
- Press Enter to use the default first sector.
- Enter Enter to use the default last sector.
- Press t and choose 3 and write linux.
After partitioning check if the partitions have been created using fdisk -l
.
mkfs.ext4 /dev/sda3
mkswap /dev/sda2
mkfs.fat -F 32 /dev/sda1
mount /dev/sda3 /mnt
mount --mkdir /dev/sda1 /mnt/boot
swapon /dev/sda2
Press o to create a new MBR partition table.
We will do it according to the example layout of the Arch wiki:
Mount point | Partition | Partition type | Suggested size |
---|---|---|---|
[SWAP] | /dev/swap_partition | swap | More than 512 MiB |
/mnt | /dev/root_partition | linux | Remainder of device |
- Press n.
- Press Enter to select the default partition number.
- Press Enter to select the default primary partition type.
- Press Enter to use the default first sector.
- Enter +512M for the last sector.
- Press t and choose 1 and write swap.
- Press n.
- Press Enter to select the default partition number.
- Press Enter to select the default primary partition type.
- Press Enter to use the default first sector.
- Enter Enter to use the default last sector.
- Press t and choose 2 and write linux.
Press a and choose 2 to make the root partition bootable.
After partitioning check if the partitions have been created using fdisk -l
.
mkfs.ext4 /dev/<root_partition>
mkswap /dev/<swap_partition>
mount /dev/<root_partition> /mnt
swapon /dev/<swap_partition>
For a minimal system download and install these packages:
pacstrap -K /mnt base base-devel linux linux-firmware e2fsprogs dhcpcd networkmanager sof-firmware git neovim man-db man-pages texinfo
ℹ️ If you are installing Arch Linux on a computer with ARM architecture add the following to the above pacstrap
command:
archlinuxarm-keyring
- Initialize pacman keys and populate them:
pacman-key --init
pacman-key --populate
- Synchronize Arch keyring:
archlinux-keyring-wkd-sync
genfstab -U /mnt >> /mnt/etc/fstab
arch-chroot /mnt
ln -sf /usr/share/zoneinfo/Region/City /etc/localtime
hwclock --systohc
Edit /etc/locale.gen and uncomment en_US.UTF-8 UTF-8 and other needed locales. Generate the locales by running:
locale-gen
Create /etc/locale.conf and set the LANG variable according to your preferred language:
LANG=de_CH.UTF-8
Create /etc/vconsole.conf and set the following variables according to your preferred language:
KEYMAP=de_CH-latin1
FONT=Lat2-Terminus16
Create /etc/hostname and type any name you wish as your hostname:
arch
Edit /etc/hosts like this:
127.0.0.1 localhost
::1 localhost
127.0.1.1 arch (your host name here!)
mkinitcpio -P
Set a new password for root:
passwd
Install grub
and efibootmgr
:
pacman -S grub efibootmgr
Run the following command:
grub-install --efi-directory=/boot --bootloader-id=GRUB
Then create a GRUB config file:
grub-mkconfig -o /boot/grub/grub.cfg
Install grub
:
pacman -S grub
Check using fdisk -l
to see the name of the disk (not partition!) and run the following command:
grub-install /dev/sdX
/dev/sdX could for example stand for /dev/sda (not /dev/sda1!)
Then create a GRUB config file:
grub-mkconfig -o /boot/grub/grub.cfg
Exit out of the chroot environment by typing exit
or pressing Ctrl+d.
Unmount all the partitions:
umount -R /mnt
Then type poweroff
and remove the installation disk.
To use pacman you first have to have a working internet connection by enabling NetworkManager:
systemctl start NetworkManager
systemctl enable NetworkManager
Now we can connect to the web using NetworkManager:
First, we list all nearby Wi-Fi networks:
nmcli device wifi list
We can then connect to a network:
nmcli device wifi connect <SSID> password <password>
Check if you receive data from the Google Server by running this command:
ping 8.8.8.8
First things first: Update the system!
pacman -Syu
Install the sudo
command:
pacman -S sudo
useradd -m -g users -G wheel,storage,power,video,audio,input <your username>
passwd <your username>
EDITOR=nvim visudo
Uncomment the following line in order to use the sudo
command without password prompt:
%wheel ALL=(ALL) NOPASSWD: ALL
You can then log in as your newly created user:
su <your username>
If you wish to have the default XDG directories (like Downloads, Pictures, Documents etc.) do:
sudo pacman -S xdg-user-dirs && xdg-user-dirs-update
To install yay:
cd $HOME && mkdir aur
cd aur
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
This will enhance graphics and improve support for multiple monitors or clipboard sharing.
sudo pacman -S spice-vdagent xf86-video-qxl
This will enhance graphics and improve support for multiple monitors or clipboard sharing.
sudo pacman -S virtualbox-guest-utils
sudo pacman -S alsa-utils alsa-plugins pipewire pipewire-alsa pipewire-pulse wireplumber
sudo pacman -S openssh iw wpa_supplicant
sudo systemctl enable sshd dhcpcd
sudo pacman -S bluez bluez-utils blueman && sudo systemctl enable bluetooth
To beautify Pacman use:
sudo nvim /etc/pacman.conf
Uncomment Color
and add below it ILoveCandy
.
ℹ️ If you have a good internet connection, you can uncomment the option ParallelDownloads = 5
.
sudo systemctl enable fstrim.timer
sudo pacman -S ntp
sudo systemctl enable ntpd
Then enable NTP:
timedatectl set-ntp true
sudo pacman -S hyprland hyprpaper swayidle
yay -S wlogout swaylock-effects-git
-
hyprland: A compositor for Wayland
-
hyprpaper: Set wallpaper in Hyprland
-
swayidle: DPMS, turning screen off after timeout period
-
wlogout: Menu for logging out, rebooting, shutting down, etc
-
swaylock-effects-git: Lockscreen
Intel:
sudo pacman -S mesa intel-media-driver libva-intel-driver vulkan-intel
NVIDIA:
sudo pacman -S nvidia
sudo pacman -S noto-fonts ttf-opensans ttf-firacode-nerd
Emojis:
sudo pacman -S noto-fonts-emoji
To support Asian letters:
sudo pacman -S noto-fonts-cjk
sudo pacman -S zsh
Change default shell to zsh:
chsh -s $(which zsh)
sudo pacman -S alacritty kitty
Neovim should already be installed after running the pacstrap command in the installation process. You can use other editors like nano too.
sudo pacman -S neovim gedit nano
sudo pacman -S wofi
sudo pacman -S waybar
sudo pacman -S ranger nemo
For image previews in ranger
, kitty
needs a dependency:
sudo pacman -S python-pillow
sudo pacman -S imv
sudo pacman -S firefox chromium
yay -S hyprshot
yay -S obs-studio-git
You have to install additional packages. Please follow these instructions: https://gist.github.com/PowerBall253/2dea6ddf6974ba4e5d26c3139ffb7580
sudo pacman -S vlc
sudo pacman -S zathura zathura-pdf-mupdf
sudo pacman -S gammastep
Check these amazing wallpapers that harmonize with the Everforest theme: https://github.com/Apeiros-46B/everforest-walls
cd $HOME/Pictures/ && git clone https://github.com/Apeiros-46B/everforest-walls.git
To make GTK applications (e.g. nemo) use dark theme, execute the following commands:
#gsettings set org.gnome.desktop.interface gtk-theme 'Adwaita-dark'
#gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'
echo 'GTK_THEME=Adwaita:dark' | sudo tee -a /etc/environment >/dev/null
Install nwg-displays to assist with positioning of monitors:
yay -S nwg-displays
The below worked for my stacked monitor configuration connected via USBC / Displayport hub:
monitor=DP-2, 3440x1440, 0x0, 1
monitor=DP-4, 3440x1440, 0x1440, 1
These languages are needed for Mason, the LSP package manager in Neovim:
sudo pacman -S nodejs npm rust go ruby rubygems php composer lua luarocks python python-pip dotnet-runtime dotnet-sdk julia java-runtime-common java-environment-common jdk-openjdk
OSS-Code (VSCode)
sudo pacman -S code
yay -S slack-desktop discord
Enable multilib repository for Steam:
sudo nvim /etc/pacman.conf
Uncomment the following:
[multilib]
Include = /etc/pacman.d/mirrorlist
sudo pacman -Sy steam ttf-liberation
sudo pacman -S tldr fzf wget curl tar unzip gzip htop neofetch
yay -S pfetch
- tldr: Commands cheat sheet
- fzf: Fuzzy finder
- wget: Fetching packages from the web
- curl: Fetching packages from the web
- tar: Enzipping/Unzipping
- unzip: Enzipping/Unzipping
- gzip: Enzipping/Unzipping
- htop: CLI task manager
- neofetch: System information
- pfetch: More concise system information
sudo pacman -S fd ripgrep bat eza tree-sitter tree-sitter-cli
- fd: Alternative to find command
- ripgrep: Alternative to grep command
- bat: Alternative to cat command
- eza: Alternative to ls command (fork of
exa
) - tree-sitter & tree-sitter-cli: Real syntax highlighting in Neovim
When done installing the necessary packages, run the sudo reboot
command.
You can either clone the repository and move the files manually to your ~/.config directory or you could use the hyprforest-installer:
If you get the following warning:
"[libseat/backend/seatd.c:70] Could not connect to socket /run/seatd.sock: no such file or directory"
Then open /etc/environment
and add the following line:
LIBSEAT_BACKEND=logind
If you get the warning "Unable to load such font with such kernel version" when starting up then edit the /etc/mkinitcpio.conf
file as follows:
- Check for the line
BINARIES=
and set it to setfont:
BINARIES=(setfont)
- Check for the line
HOOKS=
and replacekeymap
andconsolefont
withsd-vconsole
:
HOOKS=(base udev autodetect modconf kms keyboard sd-vconsole block filesystems fsck)
Then run:
mkinitcpio -P
When mkinitcpio -P
outputs warnings about missing firmware you can install this AUR packet:
yay -S mkinitcpio-firmware
Then run:
mkinitcpio -P
Install the package notification-daemon
:
sudo pacman -S notification-daemon
Create the file org.freedesktop.Notifications.service in /usr/share/dbus-1/services
with following content:
[D-BUS Service]
Name=org.freedesktop.Notifications
Exec=/usr/lib/notification-daemon-1.0/notification-daemon
Install the following package:
sudo pacman -S xdg-desktop-portal-gtk
Run the following steps to add a menu entry for Windows if dual booting:
sudo fdisk -l
You should get a long return that includes something like this:
Device Start End Sectors Size Type
/dev/nvme0n1p1 2048 1050623 1048576 512M EFI System
/dev/nvme0n1p2 1050624 874729471 873678848 416.6G Linux filesystem
/dev/nvme0n1p3 874729472 874762239 32768 16M Microsoft reserved
/dev/nvme0n1p4 874762240 1000214527 125452288 59.8G Microsoft basic data
Get the UUID of the EFI partition
sudo blkid
/dev/nvme0n1p1 (replace nvme0n1p1 with the correct partition for you)
Return: dev/nvme0n1p1: UUID="3C26-6A4C" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="3b64b43f-e7eb-4ac8-a32c-9af2edf64d0d"
Grant yourself write permission to the '40_custom' file in /etc/grub.d
Open the terminal (ctrl+alt+t) and run the following commands:
sudo chmod o+w /etc/grub.d/40_custom
Edit the 40_custom file
nvim /etc/grub.d/40_custom
Write the following at the bottom of the file and replace 3C26-6A4C with the correct UUID:
menuentry 'Windows 11' {
search --fs-uuid --no-floppy --set=root 3C26-6A4C
chainloader (${root})/EFI/Microsoft/Boot/bootmgfw.efi
}
Save the file and close the editor.
Back in the terminal, remove write permissions.
sudo chmod o-w /etc/grub.d/40_custom
Update GRUB:
grub-mkconfig -o /boot/grub/grub.cfg
(Optional) You can confirm that your change was successful by going to /boot/grub/grub.cfg and checking lines 243-251. It should reflect your edits in the 40_custom file
Reboot your computer reboot