(Works with Arch ISO Image build as of: 2024.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.
Disk partitioning type (use UEFI or 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 partiton name]
mount /dev/[root partition name] /mnt
mkdir /mnt/boot/efi
mount /dev/[efi partition name] /mnt/boot/efi
We are going to make two partitions on our HDD, SWAP & ROOT
using cfdisk
.
- If you have a brand new HDD or if no partition table is found, then create MSDos Partition Table by selecting
msdos
.
cfdisk /dev/[disk name]
- [disk name] = device to partition, find yours by running
lsblk
. - SWAP Partition should double the size of RAM available in your system. Not applicable on 16GB or more RAM.
- We will be using one partition for our
/
,/boot
&/home
.
mkfs.ext4 /dev/[root partition name]
mkswap /dev/[swap partition name]
swapon /dev/[swap partition name]
mount /dev/[root partition name] /mnt
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 /mnt base base-devel linux linux-firmware linux-headers nano intel-ucode reflector mtools dosfstools
- 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
). - Replace
nano
with editor of your choice (i.evim
orvi
). - Replace
intel-ucode
withamd-ucode
if you are using an AMD Processor.
(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
Replace the below 4096 in count=4096
with double the amount of RAM installed your system. Not applicable on 16GB or more RAM.
dd if=/dev/zero of=/swapfile bs=1M count=4096 status=progress
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
/swapfile none swap defaults 0 0
Insert the above line at the bottom of /etc/fstab
.
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
pacman -S efibootmgr
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB
grub-install --target=i386-pc /dev/[disk name]
grub-mkconfig -o /boot/grub/grub.cfg
exit
umount -a
reboot
useradd -mG wheel [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
&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
.
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.
#[multilib]
#Include = /etc/pacman.d/mirrorlist
This package is required by Steam if you play games using Vulkan Backend.
sudo pacman -S lib32-mesa
sudo pacman -S sddm
sudo systemctl enable sddm
sudo pacman -S plasma konsole dolphin ark kwrite kcalc spectacle krunner partitionmanager packagekit-qt5
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. |
krunner | KDE Quick drop-down desktop search. |
partitionmanager | KDE Disk & Partion Manager. |
sudo pacman -S alsa-utils bluez bluez-utils
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 openssh qbittorrent audacious wget screen git neofetch
Packages | Description |
---|---|
firefox | Mozilla Firefox Web Browser. |
openssh | Secure Shell access server. |
qbittorrent | A BitTorrent Client based on Qt. |
audacious | Qt based music player. |
wget | Wget is a free utility for non-interactive download of files from the Web. |
screen | Is a full-screen window manager that multiplexes a physical terminal between several processes, typically interactive shells. |
git | Github command-line utility tools. |
neofetch | Neofetch is a command-line system information tool. |
sudo systemctl enable sshd.service
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.
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.
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.
sudo pacman -S pipewire wireplumber pipewire-audio pipewire-alsa pipewire-pulse
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