This guide covers everything you need to install a full fledged Arch Linux System with KDE Plasma Desktop Environment.
Connect using Wi-Fi
systemctl start iwd
- Starts IW Daemonsystemctl start dhcpcd
- Starts DHCP Client Daemonifconfig
- Check Wi-Fi Interface Name (wlan0/wlo1/wlp2s0)iwctl station <interface> connect "<ssid>"
- Enter password after hitting enter
Connect using USB Tethering
- Connect your phone with your PC using USB Cable
- Enable USB Tethering in your phone from Settings
ping -c 3 1.1.1.1
- Check if DHCP is workingping -c 3 archlinux.org
- Check if DNS is working
timedatectl set-timezone <Region/City>
- Put your timezone here (Asia/Kolkata)timedatectl set-ntp true
- Enable Network Time Synctimedatectl set-local-rtc true
- Sync local time with hardware clock
fdisk -l
- List Devices and Partitionscfdisk /dev/<device>
- Make 3 partitions:
- 512M EFI System Partition (
<efi>
) - 8.8G Linux Swap Partition (
<swap>
) - Remaining Size (Preferably 140.3G) Linux Filesystem (
<root>
)
then write and quit
fdisk -l
- Check the partition numbers properly.mkfs.fat -F 32 /dev/<efi>
- Format the EFI Filesystem in Fat32mkswap /dev/<swap>
- Format the Swap Filesystem
BTRFS as root (Skip to next section for EXT4 guide)
mkfs.btrfs -f /dev/<root>
- Format the Root Filesystem in B-Tree Filesystemmount /dev/<root> /mnt
- Mount the Root to /mnt
btrfs su cr /mnt/@
btrfs su cr /mnt/@home
btrfs su cr /mnt/@var
btrfs su cr /mnt/@opt
btrfs su cr /mnt/@tmp
btrfs su cr /mnt/@.snapshots
umount /mnt
mount -o noatime,commit=120,compress=zstd,space_cache=v2,subvol=@ /dev/<root> /mnt
mkdir /mnt/{boot,home,var,opt,tmp,.snapshots}
mount -o noatime,commit=120,compress=zstd,space_cache=v2,subvol=@home /dev/<root> /mnt/home
mount -o noatime,commit=120,compress=zstd,space_cache=v2,subvol=@opt /dev/<root> /mnt/opt
mount -o noatime,commit=120,compress=zstd,space_cache=v2,subvol=@tmp /dev/<root> /mnt/tmp
mount -o noatime,commit=120,compress=zstd,space_cache=v2,[email protected] /dev/<root> /mnt/.snapshots
mount -o subvol=@var /dev/<root> /mnt/var
OR, EXT4 as root
mkfs.ext4 /dev/<root>
- Format the Root Filesystem in Ext4 Filesystemmount /dev/<root> /mnt
- Mount the Root to /mnt
mkdir /mnt/boot/efi
- Make the EFI mount point foldermount /dev/<efi> /mnt/boot/efi
- Mount the EFI Partitionswapon /dev/<swap>
- Using the Swap Partition
nano /etc/pacman.conf
- Uncomment the following:
Color
ParallelDownloads = 5
[multilib]
Include = /etc/pacman.d/mirrorlist
then save (Ctrl + S) and exit (Ctrl + X)
pacstrap /mnt base linux linux-firmware vim nano btrfs-progs
- Select the default.
NOTE: If you want Linux Zen Kernel, replace "
linux
" with "linux-zen
". Don't replace "linux-firmware
".
Also, if you are using Ext4, then "btrfs-progs
" is not needed.
genfstab -U /mnt >> /mnt/etc/fstab
- Generating fstab configuration
arch-chroot /mnt
NOTE: Chroot environment is the environment running inside the root directory of the new system. It is the environment in which the installation actually takes place. Do not exit this environment until the installation is complete, or the system may not boot properly. Also, don't be confused if you see same commands again. It's because you are now in the new system.
echo "<hostname>" > /etc/hostname
- Replace<hostname>
with your hostname hereecho 127.0.0.1$'\t'localhost >> /etc/hosts
echo ::1$'\t\t'localhost >> /etc/hosts
echo 127.0.1.1$'\t'$(cat /etc/hostname) >> /etc/hosts
nano /etc/locale.gen
- Uncomment your locale here (en_US.UTF-8)locale-gen
- Generates your locales based on "/etc/locale.gen
"echo "LANG=en_US.UTF-8" > /etc/locale.conf
export $(cat /etc/locale.conf)
nano /etc/pacman.conf
- Uncomment the following:
Color
ParallelDownloads = 5
[multilib]
Include = /etc/pacman.d/mirrorlist
then save (Ctrl + S) and exit (Ctrl + X)
pacman -Syy sudo linux-headers efibootmgr grub intel-ucode git base-devel grub-btrfs dkms avahi os-prober ntfs-3g terminus-font
NOTE: If you have an AMD Processor instead, replace "
intel-ucode
" with "amd-ucode
"
If you have installed "linux-zen
" in the previous pacstrap command, then replace "linux-headers
" with "linux-zen-headers
"
Also, if you have Ext4 then "grub-btrfs
" is not required.
echo "FONT=ter-112n" > /etc/vconsole.conf
- Adds Terminus Font to Console
passwd
- Enter new password for rootuseradd -s /bin/bash -mG wheel <username>
- Enter your new username (<username>
)passwd <username>
- Enter new password for your new userEDITOR=nano visudo
- At the bottom of the file, uncomment the line "%wheel ALL=(ALL:ALL) ALL
", save (Ctrl + S) and exit (Ctrl + X)
grub-install --target=x86_64-efi --bootloader-id="Arch Linux" --efi-directory=/boot/efi --recheck
- Installing GRUB
NOTE: If your UEFI Entry disappears on reboot due to the requirement of known location to bootable file before showing up UEFI NVRAM Boot entries, just use "
--removable
" flag after the whole command.
nano /etc/default/grub
- Uncomment the line at the end of file saying "GRUB_DISABLE_OS_PROBER=false
"mkinitcpio -P
- Generating Initramfsgrub-mkconfig -o /boot/grub/grub.cfg
- Generating GRUB Configuration file
pacman -S plasma plasma-wayland-session kde-applications sddm gnu-free-fonts noto-fonts noto-fonts-emoji packagekit-qt5 gnome-keyring cronie pipewire-media-session pipewire-jack phonon-qt5-vlc tesseract-data-ind python-pyqt5 xdg-desktop-portal-kde
- Read carefully and select the options
Go forall
in the options, then wait till installation pacman -R colord colord-kde
- Fixes screen color issuessystemctl enable NetworkManager sddm avahi-daemon
- Enabling KDE's NetworkManager, Display Manager and Avahi Daemonexit
- Exiting Chrootreboot now
- Rebooting to Installed Arch Linux. Do not forget to change DE to Plasma (X11).
cd /opt
sudo git clone https://aur.archlinux.org/yay-git.git
sudo chown -R $USER:$USER ./yay-git
cd yay-git
makepkg -si
Optional: Performance Tweak for YAY
sudo pacman -S ccache
sudo nano /etc/makepkg.conf
Find BUILDENV and remove the exclamation (!
) mark from "ccache
" like this:
BUILDENV=(fakeroot !distcc color ccache check !sign)
Find MAKEFLAGS, uncomment it and edit the numerical value to the number of CPU threads you have. For example, for 16 threads, do this:
MAKEFLAGS="-j16"
Save (Ctrl + S) and Exit (Ctrl + X)
- Run the following command to add ccache to your PATH:
cat >> /etc/bash.bashrc << EOF
export PATH="/usr/lib/ccache/bin/:$PATH"
EOF
Optional: For Zsh Users
cat >> /etc/zsh/zshrc << EOF
export PATH="/usr/lib/ccache/bin/:$PATH"
EOF
- Run the following command to create a hook for NVIDIA Drivers:
cat > /etc/pacman.d/hooks/nvidia.hook << EOF
[Trigger]
Operation=Install
Operation=Upgrade
Operation=Remove
Type=Package
Target=nvidia
Target=nvidia-dkms
Target=nvidia-lts
Target=linux
Target=linux-zen
[Action]
Description=Update NVIDIA module in initcpio
Depends=mkinitcpio
When=PostTransaction
NeedsTargets
Exec=/bin/sh -c 'while read -r trg; do case \$trg in linux) exit 0; esac; done; /usr/bin/mkinitcpio -P'
EOF
NOTE: If you have installed Linux Zen Kernel, then replace "
linux
" with "linux-zen
" in the last line.
Save (Ctrl + S) and Exit (Ctrl + X)
yay -S nvidia-dkms nvidia-utils lib32-nvidia-utils opencl-nvidia lib32-opencl-nvidia nvidia-settings
- Installing NVIDIA Drivers
NOTE: Some Laptops come with NVIDIA Optimus Technology by which the NVIDIA GPU is used only when needed, otherwise an Integrated Intel/AMD GPU is used. If you have such a laptop, then expand and follow the Optimus section below. This is usually not required for Desktops.
Optional: NVIDIA Optimus
yay -S nvidia-prime
- Installing NVIDIA Optimus
This package comes with a script called prime-run which can be used to run any application with NVIDIA GPU.
For example, to run Steam with NVIDIA GPU, do this:
prime-run steam
sudo pacman -S flatpak
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
- Adding FlatHub reposudo flatpak override --filesystem=xdg-config/gtk-3.0
- Forcing FlatPak to use System GTK Themesreboot
- Reboot to complete installation
Alternate: Installing Snapd
yay -S snapd
sudo systemctl enable snapd snapd.socket snapd.seeded snapd.apparmor
sudo ln -s /var/lib/snapd/snap /snap
reboot
- Reboot to complete installation
sudo pacman -S plymouth
sudo nano /etc/mkinitcpio.conf
Edit HOOKS to have "plymouth
" after "base
" and "udev
" and MODULES to have "i915
" (for Intel GPU only) at beginning like this:
MODULES=(i915 ...)
HOOKS=(base udev plymouth ...)
NOTE: If you have AMD GPU, replace "
i915
" with "amdgpu
" and for NVIDIA GPU, replace it with "nvidia nvidia_modeset nvidia_uvm nvidia_drm
"
NOTE: For Laptops having a dGPU and an iGPU, consider using iGPU in this part, i.e., usually Intel GPU or AMD GPU.
Save (Ctrl + S) and Exit (Ctrl + X)
sudo mkinitcpio -P
sudo nano /etc/default/grub
Edit GRUB_CMDLINE_LINUX_DEFAULT
to have "splash
" after "quiet
" like this:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
Save (Ctrl + S) and Exit (Ctrl + X)
yay -S update-grub
sudo update-grub
yay -S plymouth-theme-arch-breeze-git
sudo plymouth-set-default-theme -R arch-breeze
NOTE: To list all available themes, run
plymouth-set-default-theme -l
reboot
- Reboot to complete installation
git clone https://github.com/xenlism/Grub-themes.git
cd ./Grub-themes/xenlism-grub-arch-1080p/
NOTE: If your monitor has a higher resolution than 1080p, then select the theme directory accordingly.
sudo ./install.sh
reboot now
- Reboot to complete installation
yay -S mkinitcpio-firmware
sudo pacman -S zsh zshdb zsh-syntax-highlighting zsh-autosuggestions zsh-history-substring-search
touch ~/.zshrc
- Create Initial Empty Zsh Configchsh -s /bin/zsh
- Change Default Shell to Zshsh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
- Install Oh-My-Zsh on top of zshnano .zshrc
Edit the value of ZSH_THEME
to "xiong-chiamiov
" like this:
ZSH_THEME="xiong-chiamiov"
Edit the last line of the file to have the following:
cat >> ~/.zshrc << EOF
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source /usr/share/zsh/plugins/zsh-history-substring-search/zsh-history-substring-search.zsh
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
EOF
Save (Ctrl + S) and Exit (Ctrl + X)
reboot
- Reboot to complete installation
yay -S google-chrome microsoft-edge-stable-bin
Optional: Enable Dark Mode in Google Chrome
Edit the application launcher to have the following as the command:/usr/bin/google-chrome-stable --enable-features=WebUIDarkMode --force-dark-mode %U
yay -S timeshift timeshift-autosnap
Open Timeshift from your app launcher and set BTRFS Backup to Boot, Daily and Hourly. Also select @home
subvolume for backup. That's it.
curl -O https://blackarch.org/strap.sh
chmod +x strap.sh
sudo ./strap.sh
sudo pacman -Syyu
- Run the following command to create a rule for udisks:
cat > /etc/polkit-1/rules.d/.rules << EOF
polkit.addRule(function(action, subject) {
if (((action.id == "org.freedesktop.udisks2.filesystem-fstab") ||
(action.id == "org.freedesktop.udisks2.filesystem-fstab")) &&
subject.local && subject.active) {
return polkit.Result.YES;
}
});
polkit.addRule(function(action, subject) {
if (((action.id == "org.freedesktop.udisks2.filesystem-mount-system") ||
(action.id == "org.freedesktop.udisks2.filesystem-mount-system")) &&
subject.local && subject.active) {
return polkit.Result.YES;
}
});
EOF
Save (Ctrl + S) and Exit (Ctrl + X)
reboot
- Reboot to apply changes