(Works with Arch ISO Image build as of: 2024.03.01)
Hello everyone, This is my guide for installing minimal Arch Linux with KDE Plasma Desktop Environment. In this guide we will go step by step on how I install my Arch System and set everything up from scratch for a stable & healthy OS.
- Let's Begin
- Disk Partitioning
- Base System Installation
- Chroot
- Boot Freshly Installed System
- User Login
- The Conclusion
- Extras (optional)
- Theming & Customisations
- Maintenance, Performance Tuning & Monitoring
- Changelog
- Grab the latest built ISO Image from Arch Linux Download and write it to an empty USB Stick.
- After the image is done writing, it's time to boot into the Arch Live Environment. First thing you do is:
For a list of all the available keymaps, use the command:
localectl list-keymaps
To search for a keymap, use the following command, replacing [search_term]
with the code for your language, country, or layout:
localectl list-keymaps | grep -i [search_term]
loadkeys [keymap]
ping -c 4 google.com
- If you are connected through Ethernet, then your Internet will be working out of the box.
- If you are using Wi-Fi, then use
wifi-menu
to connect to your local network. - If this step is successful then we will head to next one.
timedatectl set-ntp true
⚠️ Be extremely careful when managing your disks, incase you delete your precious data then DON'T blame me.⚠️ MOUNT ROOT FIRST!!! Disk partitioning type (use UEFI, I dont support MBR go according to your system).
We are going to make two partitions on our HDD, EFI BOOT & ROOT
using gdisk
.
- If you have a brand new HDD or if no partition table is found, then create GPT Partition Table by pressing
g
.
gdisk /dev/[disk name]
- [disk name] = device to partition, find yours by running
lsblk
. - We will be using one partition for our
/
,/boot
&/home
.
n = New Partition
simply press enter = 1st Partition
simply press enter = As First Sector
+512M = As Last sector (BOOT Partition Size)
ef00 = EFI Partition Type
n = New Partition again
simply press enter = 2nd Partition
simply press enter = As First Sector
simply press enter = As Last sector [ROOT Partition Size (using the remaining disk space left)]
8300 or simply press enter = EXT4 ROOT Partition Type
w = write & exit
mkfs.fat -F32 /dev/[efi partition name]
mkfs.ext4 /dev/[root partition name]
mkfs.btrfs /dev/[root partition name]
mkswap /dev/[swap partition name]
mount /dev/[root partition name] /mnt
mount /dev/[home partition name] /mnt/home
swapon /dev/[swap partition name]
mount /dev/[root partiton name] /mnt
btrfs su cr /mnt/@
btrfs su cr /mnt/@home
btrfs su cr /mnt/@log
btrfs su cr /mnt/@pkg
btrfs su cr /mnt/@tmp
btrfs su cr /mnt/@.snapshots
btrfs su li /mnt
cd /
umount /mnt
mount -o defaults,noatime,compress=zstd,commit=120,subvol=@ /dev/[root partiton name] /mnt
mkdir -p /mnt/{home,var/log,/var/cache/pacman/pkg,tmp,.snapshots}
mount -o defaults,noatime,compress=zstd,commit=120,subvol=@home /dev/[root partiton name] /mnt/home
mount -o defaults,noatime,compress=zstd,commit=120,subvol=@log /dev/[root partiton name] /mnt/var/log
mount -o defaults,noatime,compress=zstd,commit=120,subvol=@pkg /dev/[root partiton name] /mnt//var/cache/pacman/pkg
mount -o defaults,noatime,compress=zstd,commit=120,subvol=@tmp /dev/[root partiton name] /mnt/tmp
mount -o defaults,noatime,compress=zstd,commit=120,[email protected] /dev/[root partiton name] /mnt/.snapshots
Add /efi to the end of boot partition if you choose GRUB
mkdir -p /mnt/boot/efi
mount /dev/[boot partition name] /mnt/boot/efi
swapon /dev/[swap partition name]
reflector -c County1 -c Country2 -a 12 -p https --sort rate --save /etc/pacman.d/mirrorlist
Replace Country1
& Country2
with countries near to you or with the one you're living in. Refer to Reflector for more info.
pacstrap -K /mnt base base-devel linux linux-firmware linux-headers linux-lts linux-lts-headers nano amd-ucode reflector dosfstools mtools btrfs-progs
- Replace
linux
with linux-hardened, linux-lts or linux-zen to install the kernel of your choice. - Replace
linux-headers
with Kernel type type of your choice respectively (e.g if you installedlinux-zen
then you will needlinux-zen-headers
). - Install
btrfs-progs
only if you use btrfs - Replace
nano
with editor of your choice (i.evim
orvi
). - Replace
intel-ucode
withamd-ucode
if you are using an AMD Processor. - I recommend you install
linux-lts
linux-lts-headers
just in case kernel update fucks up your system
(use -U
or -L
to define by UUID or labels, respectively)
genfstab -U /mnt >> /mnt/etc/fstab
Check the resulting /mnt/etc/fstab
file, and edit it in case of errors.
arch-chroot /mnt
ln -sf /usr/share/zoneinfo/Region/City /etc/localtime
hwclock --systohc
Replace Region
& City
according to your Time zone. Refer to Time zone more info.
We will use en_US.UTF-8
here but, if you want to set your language, replace en_US.UTF-8
with yours in all below instances.
nano /etc/locale.gen
Uncomment the below line
#en_US.UTF-8 UTF-8
save & exit.
locale-gen
echo LANG=en_US.UTF-8 > /etc/locale.conf
For keyboard users with non US Eng only. Replace [keymap]
with yours.
echo "KEYMAP=[keymap]" > /etc/vconsole.conf
echo arch > /etc/hostname
Replace arch
with hostname of your choice.
nano /etc/hosts
127.0.0.1 localhost
::1 localhost
127.0.1.1 arch.localdomain arch
Replace arch
with hostname of your choice.
save & exit.
pacman -S networkmanager
systemctl enable NetworkManager
passwd
pacman -S grub efibootmgr
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB
grub-mkconfig -o /boot/grub/grub.cfg
bootctl install
nano /boot/loader/loader.conf
default arch
timeout 5
editor no
replace amd with intel-ucode in the next step if you use a intel CPU
nano /boot/loader/entries/arch.conf
title Arch Linux
linux /vmlinuz-linux
initrd /amd-ucode.img
initrd /initramfs-linux.img
options root=/dev/[root partition] rw
cp /boot/loader/entries/arch.conf /boot/loader/entries/arch-fallback.conf
nano /boot/loader/entries/arch-fallback.conf
title Arch Linux Fallback
linux /vmlinuz-linux
initrd /amd-ucode.img
initrd /initramfs-linux-fallback.img
options root=/dev/[root partition] rw
cp /boot/loader/entries/arch.conf /boot/loader/entries/arch-lts.conf
nano /boot/loader/entries/arch-lts.conf
title Arch Linux LTS
linux /vmlinuz-linux
initrd /amd-ucode.img
initrd /initramfs-linux-lts.img
options root=/dev/[root partition] rw
title Arch Linux
linux /vmlinuz-linux
initrd /amd-ucode.img
initrd /initramfs-linux.img
options initrd=/initramfs-linux.img root=/dev/[root partition] rw rootflags=subvol=@
cp /boot/loader/entries/arch.conf /boot/loader/entries/arch-fallback.conf
nano /boot/loader/entries/arch-fallback.conf
title Arch Linux Fallback
linux /vmlinuz-linux
initrd /amd-ucode.img
initrd /initramfs-linux-fallback.img
options initrd=/initramfs-linux.img root=/dev/[root partition] rw rootflags=subvol=@
cp /boot/loader/entries/arch.conf /boot/loader/entries/arch-lts.conf
nano /boot/loader/entries/arch-lts.conf
title Arch Linux lts
linux /vmlinuz-linux
initrd /amd-ucode.img
initrd /initramfs-linux-lts.img
options initrd=/initramfs-linux.img root=/dev/[root partition] rw rootflags=subvol=@
systemctl enable systemd-boot-update.service
bootctl list
exit
umount -R /mnt
reboot
multilib contains 32-bit software and libraries that can be used to run and build 32-bit applications on 64-bit installs (e.g. Wine, Steam, etc).
Edit /etc/pacman.conf
& uncomment the below two lines.
#before ParallelDownloads = 5
#[multilib]
#Include = /etc/pacman.d/mirrorlist
pacman -S bash-completion
useradd -m -g users -G audio,video,network,wheel,storage,rfkill -s /bin/bash [username]
Replace [username]
with your username of choice.
passwd [username]
EDITOR=nano visudo
#%wheel ALL=(ALL) ALL
save & exit.
exit
sudo pacman -Syu
sudo pacman -S xorg [xf86-video-your gpu type]
- For Nvidia GPUs, type
nvidia-dkms
&nvidia-settings
. For more info/old GPUs, refer to Arch Wiki - Nvidia. - For newer AMD GPUs, type
xf86-video-amdgpu
. - For legacy Radeon GPUs like HD 7xxx Series & below, type
xf86-video-ati
. - For dedicated Intel Graphics, type
xf86-video-intel
.
sudo pacman -S plasma konsole dolphin ark kwrite kcalc spectacle partitionmanager firewalld
sudo systemctl enable sddm
Packages | Description |
---|---|
plasma | KDE Plasma Desktop Environment. |
konsole | KDE Terminal. |
dolphin | KDE File Manager. |
ark | Archiving Tool. |
kwrite | Text Editor. |
kcalc | Scientific Calculator. |
spectacle | KDE screenshot capture utility. |
partitionmanager | KDE Disk & Partion Manager. |
sudo pacman -S bluez bluez-utils --needed
Packages | Description |
---|---|
alsa-utils | This contains (among other utilities) the alsamixer and amixer utilities. |
bluez | Provides the Bluetooth protocol stack. |
bluez-utils | Provides the bluetoothctl utility. |
sudo systemctl enable bluetooth.service
You can install all the following packages or only the one you want.
sudo pacman -S firefox qbittorrent wget git neofetch
Packages | Description |
---|---|
firefox | Mozilla Firefox Web Browser. |
qbittorrent | A BitTorrent Client based on Qt. |
wget | Wget is a free utility for non-interactive download of files from the Web. |
git | Github command-line utility tools. |
neofetch | Neofetch is a command-line system information tool. |
reboot
Now everything is installed and after the final reboot
, you will land in you GUI Login Screen ready to use your system. You can also do some extra steps mentioned below to further improve your experience. I'll recommend you to install yay
& paccache
.
- Yay will provide your packages from AUR (Arch User Repository), which are not available in the Official Repo.
- Paccache can be used clean pacman cached packages either manually or in an automated way.
https://christitus.com/ultimate-linux-gaming-guide/
Install Yay
Yet Another Yogurt - An AUR Helper.
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
Install Zsh
Zsh is a powerful shell that operates as both an interactive shell and as a scripting language interpreter.
sudo pacman -S zsh zsh-completions
Read here for customisation & theming for Zsh. Read below how to change your SHELL.
sudo nano /etc/default/grub
Uncomment the following line
##GRUB_DISABLE_OS_PROBER=false
sudo pacman -S os-prober
And execute
sudo os-prober
Update Grub
sudo grub-mkconfig -o /boot/grub/grub.cfg
First check your current SHELL by running:
echo $SHELL
chsh -l
For an example, we will set Zsh as default SHELL which we installed in the last step:
chsh -s /usr/bin/zsh
For the changes to apply, you will have Logout and Log back in or better do reboot
.
PipeWire is a new low-level multimedia framework. It aims to offer capture and playback for both audio and video with minimal latency and support for PulseAudio, JACK, ALSA and GStreamer-based applications.
Install either helvum
or qpwgraph
for GTK or QT GUI Interface
sudo pacman -S pipewire pipewire-alsa pipewire-pulse pipewire-jack wireplumber
systemctl --user enable --now pipewire.socket
systemctl --user enable --now pipewire-pulse.socket
systemctl --user enable --now wireplumber.service
EasyEffects (former PulseEffects) is a GTK utility which provides a large array of audio effects and filters to individual application output streams and microphone input streams. Notable effects include an input/output equalizer, output loudness equalization and bass enhancement, and input de-esser and noise reduction plug-in. Install
sudo pacman -S easyeffects
or
yay -S easyeffects-git
This will also install pipewire-pulse and replace PulseAudio with PipeWire.
Clam AntiVirus is an open source (GPL) anti-virus toolkit for UNIX. It provides a number of utilities including a flexible and scalable multi-threaded daemon, a command line scanner and advanced tool for automatic database updates.
sudo pacman -S clamav
sudo freshclam
sudo systemctl enable --now clamav-freshclam.service
sudo systemctl enable --now clamav-daemon.service
GUI for ClamAV
sudo pacman -S clamtk
Download the latest master zip
from ClanTK-KDE Gitlab & extract it your ~/Downloads
folder. Now open a terminal from within the extracted folder & run:
sudo cp clamtk-kde.desktop /usr/share/kservices5/ServiceMenus/
sudo pacman -S cups
sudo systemctl enable --now cups.service
Install Oh My Zsh
Oh My Zsh is an open source, community-driven framework for managing your Zsh configuration.
sh -c "$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"
My favourite theme is Powerlevel10k (follow below for installation).
- You can visit here to download theme of your choice.
Get Powerlevel10k Theme for Oh My Zsh
This is the theme I'll install to spice up my terminal experience.
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
We will be using Yay to install the below two packages as one of them is only available from AUR.
yay -S ttf-dejavu ttf-meslo-nerd-font-powerlevel10k
Also set your Konsole Terminal font to MesloGS-NF-Regular
.
nano ~/.zshrc
Find the line starting with ZSH_THEME="...."
and replace the theme name so the line should now look like this ZSH_THEME="powerlevel10k/powerlevel10k"
Now do source ~/.zshrc
.
For new users, on the first run, Powerlevel10k configuration wizard will ask you a few questions and configure your prompt. If it doesn't trigger automatically, type
p10k configure
. Configuration wizard creates~/.p10k.zsh
based on your preferences. Additional prompt customization can be done by editing this file. It has plenty of comments to help you navigate through configuration options.
Kvantum is a SVG-based theme engine for Qt, tuned to KDE and LXQt, with an emphasis on elegance, usability and practicality.
yay -S kvantum-qt5-git
Or
sudo pacman -S kvantum
Pacman Cache Cleaner.
Install
sudo pacman -S pacman-contrib
To manually clean pacman cache, run
sudo paccache -rk
Where, k indicates to keep "num" of each package in the cache.
Create a file in /etc/pacman.d/hooks
sudo mkdir /etc/pacman.d/hooks
sudo nano /etc/pacman.d/hooks/clean_cache.hook
Add the following lines in it
[Trigger]
Operation = Upgrade
Operation = Install
Operation = Remove
Type = Package
Target = *
[Action]
Description = Cleaning pacman cache...
When = PostTransaction
Exec = /usr/bin/paccache -rk
save & exit.
Install Cockpit
A systemd web based user interface for Linux servers, Workstations and even Desktops. Can be used to monitor your system stats, performance and perform various settings including updating of your system.
sudo pacman -S cockpit
sudo systemctl enable --now cockpit.socket
Now open your browser and point to it your-machine-ip:9000
and login with root to get full access.
- 2023-10-24
- Updated
kvantum
package name.
- Updated
- 2023-10-24
- Added
efibootmgr
package for UEFI installation. Thanks to mctesterwork for the pull.
- Added
- 2023-04-06
- Updated guide compatibility for
2023-04-01
iso image.
- Updated guide compatibility for
- 2023-03-06
- Updated guide compatibility for
2023-03-01
iso image.
- Updated guide compatibility for
- 2023-01-03
- Updated guide compatibility for
2023-01-01
iso image.
- Updated guide compatibility for