Skip to content

My installation instructions for arch linux ๐Ÿ–ฅ๏ธ

Notifications You must be signed in to change notification settings

FTKhanFT/arch-installation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

16 Commits
ย 
ย 
ย 
ย 

Repository files navigation

Arch Logo
Arch Linux

Installation instructions

Last Commit

This tutorial is inspired by https://sourceforge.net/projects/ezos/files/ArchStuff/

Index

1. Live Setup

Set keyboard layout

โŒจ๏ธ The default keymap is US. Available layouts can be listed with:

ls /usr/share/kbd/keymaps/**/*.map.gz
loadkeys de-latin1

If WiFi install

๐Ÿ“ถ Use this tool to connect to your network

wifi-menu

Sync time

๐Ÿ•’ Ensure the system clock is accurate

timedatectl set-ntp true

Check if booted in BIOS or UEFI

ls /sys/firmware/efi/efivars

If the directory does not exist, the system may be booted in Legacy BIOS Mode

2. Partitioning

Partitioning

Start partitioning tool

BIOS:

fdisk /dev/sdX

UEFI:

gdisk /dev/sdX

Universal + Graphical:

cfdisk /dev/sdX

Create partitions

Decide partition table type

  • BIOS: You can use both but this guide uses DOS
  • UEFI: You need to use GPT

GPT (UEFI)

Needed Partition Partition type Mount point
โœ”๏ธ /dev/sdXY EFI system partition /mnt/boot/EFI
โŒ /dev/sdXY Linux swap -
โœ”๏ธ /dev/sdXY Linux /mnt
โŒ /dev/sdXY Linux /mnt/home

DOS (BIOS)

Needed Partition Partition type Mount point Flags
โŒ /dev/sdXY Linux swap - -
โœ”๏ธ /dev/sdXY Linux /mnt Bootable
โŒ /dev/sdXY Linux /mnt/home -

Size recommendations

EFI system

  • At least: 150MB
  • Recommended: 300MB

Swap

Taken from https://docs.voidlinux.org/installation/live-images/partitions.html

System RAM Recommended swap space Swap space if using hibernation
< 2GB 2x the amount of RAM 3x the amount of RAM
2-8GB Equal to amount of RAM 2x the amount of RAM
8-64GB At least 4GB 1.5x the amount of RAM
64GB At least 4GB Hibernation not recommended

Formatting partitions

EFI system partition:

mkfs.fat -F32 -n EFI /dev/sdXY

๐Ÿ’ฝ Create root filesystem:

mkfs.ext4 -L ROOT /dev/sdXY

๐Ÿ  If you use a separate home partition:

mkfs.ext4 -L HOME /dev/sdXY

Create Swap:

mkswap -L SWAP /dev/sdXY
swapon /dev/sdXY

3. Mounting accordingly

๐Ÿ’ฝ Mount root filesystem:

mount /dev/sdXY /mnt

UEFI:

mkdir -p /mnt/boot/EFI
mount /dev/sdXY /mnt/boot/EFI

๐Ÿ  If seperate home partiton:

mkdir /mnt/home
mount /dev/sdXY /mnt/home

4. Base installation

Rank the mirrors before for faster downloads

๐Ÿ“Š This will rank the mirrorlist. You may replace United States with your country

pacman -Sy archlinux-keyring reflector
reflector --country 'United States' --age 15 --protocol https --sort rate --save /etc/pacman.d/mirrorlist

Start the installation

โณ This will install the system and may take a while

pacstrap /mnt base base-devel linux linux-firmware linux-lts sysfsutils usbutils e2fsprogs inetutils netctl nano less which man-db man-pages

Create filesystem table

Identify by UUID (better):

genfstab -U /mnt >> /mnt/etc/fstab

Identify by Labels:

genfstab -L /mnt >> /mnt/etc/fstab

Change root

arch-chroot /mnt

5. Install Bootloader

โ–ถ๏ธ UEFI:

pacman -S grub os-prober efibootmgr dosfstools mtools fatresize
grub-install --target=x86_64-efi --bootloader-id=grub_uefi --recheck
grub-mkconfig -o /boot/grub/grub.cfg

โ–ถ๏ธ BIOS:

pacman -S grub os-prober
grub-install --target=i386-pc --recheck /dev/sdX
grub-mkconfig -o /boot/grub/grub.cfg

๐Ÿ’พ Create initial ramdisk for LTS kernel

mkinitcpio -p linux-lts

6. Setup time/date and languages

Setup hostname

๐Ÿ“› This will be the name of your PC on your network

echo myhostname > /etc/hostname
nano /etc/hosts

Add these lines

127.0.0.1   localhost
::1         localhost
127.0.1.1   myhostname.localdomain  myhostname

Setup locale

๐ŸŒ Uncomment all languages you need

nano /etc/locale.gen

Generate locales

locale-gen

๐Ÿ”˜ Set locale

echo LANG=en_US.UTF-8 >> /etc/locale.conf
export LANG=en_US.UTF-8

โŒจ๏ธ Set tty keymap

echo KEYMAP=de-latin1 > /etc/vconsole.conf

Setup time & date

๐Ÿ“… You can tab-complete your stuff after zoneinfo

ln -sf /usr/share/zoneinfo/Region/City /etc/localtime
hwclock --systohc --utc

Setup multilib

nano /etc/pacman.conf

Uncomment multilib (๐Ÿฌ and add ILoveCandy to Misc section)

pacman -Syu

7. Setup users

Setup users

Set root password

๐Ÿ”‘ Use a strong and complicated password

passwd

Add your user

๐Ÿง‘ This will be your user you use to log in

useradd -m -G users,wheel,audio,video,storage,power,input,optical,sys,log,network,floppy,scanner,rfkill,lp,adm -s /bin/bash yourusername
passwd yourusername

If you want to force your user to change password after first login:

chage -d 0 yourusername

Enable sudo

EDITOR=nano visudo

Uncomment %wheel ALL=(ALL) ALL

8. Install some useful packages

General packages

pacman -S linux-headers linux-lts-headers dkms
pacman -S jshon expac git wget acpid avahi xdotool pacman-contrib net-tools
systemctl enable acpid avahi-daemon systemd-timesyncd

Printer support

๐Ÿ–จ๏ธ Add some packages needed for printing

General packages:

pacman -S system-config-printer foomatic-db foomatic-db-engine gutenprint gsfonts cups cups-pdf cups-filters sane simple-scan
systemctl enable org.cups.cupsd.service saned.socket

UI for HP Printers:

pacman -S hplip

Display Server:

๐Ÿ–ฅ๏ธ Xorg is the display server we will use

pacman -S xorg-server xorg-xinit xorg-xrandr xorg-xfontsel xorg-xkill

9. Install Desktop Environment

๐Ÿ—” You need to select a desktop environment

  • For beginners coming from Windows I recommend KDE Plasma.
  • For a very resource friendy desktop I recommend Xfce
  • The instructions for KDE Plasma are tested by me because I use it. Others should work but you may need some extra packages for productive use

LXDE:

pacman -S lxde

LXQt:

pacman -S lxqt breeze-icons pcmanfm-qt qterminal lxqt-sudo polkit-qt5

GNOME:

pacman -S gnome gnome-extra

Cinnamon:

pacman -S cinnamon nemo-fileroller

KDE Plasma:

pacman -S plasma plasma-wayland-session konsole dolphin gwenview ark kate okular

Xfce:

pacman -S xfce4 xfce4-goodies

Budgie:

pacman -S budgie-desktop gnome

Mate:

pacman -S mate mate-extra

Deepin:

pacman -S deepin deepin-extra
nano /etc/lightdm/lightdm.conf
greeter-session=lightdm-deepin-greeter

10. Install and enable Desktop Manager and some other useful stuff

Display Manager

๐Ÿ–ฅ๏ธ A display manager is basically your login screen where you enter your user details and select your Desktop Environment

LXDM (Included in LXDE)

pacman -S lxdm
systemctl enable lxdm

SDDM (Included in KDE Plasma)

pacman -S sddm
systemctl enable sddm

GDM (Included with GNOME)

pacman -S gdm
systemctl enable gdm

LightDM

pacman -S lightdm lightdm-gtk-greeter
systemctl enable lightdm

Graphics Driver

Open Source drivers:

pacman -S xorg-drivers mesa lib32-mesa

Nvidia proprietary driver:

pacman -S nvidia lib32-nvidia-utils

AMD Utils:

pacman -S vulkan-radeon lib32-vulkan-radeon

Networking

๐Ÿ–ง This are essential networking tools

pacman -S networkmanager networkmanager-openvpn networkmanager-pptp dnsmasq
systemctl enable NetworkManager

If you use WiFi:

๐Ÿ“ถ This are essential tools if you connect to the internet via WiFi

pacman -S wireless_tools wpa_supplicant ifplugd dialog
systemctl enable net-auto-wireless

Some archive and file system utils

๐Ÿ—„๏ธ Important tools for archives and file systems

pacman -S p7zip unrar unarchiver unzip unace xz rsync
pacman -S nfs-utils cifs-utils ntfs-3g exfat-utils

Sound

๐Ÿ”Š Some essential packages for sound

pacman -S alsa-utils pulseaudio-alsa pulseaudio-equalizer pulseaudio-jack

Control app for GTK Desktop:

pacman -S pavucontrol

Control app for Qt Desktop:

pacman -S pavucontrol-qt

๐Ÿ”‡ PulseAudio fix notifications sounds muting some media players

nano /etc/pulse/default.pa

Comment out # load-module module-role-cork

Other shells

๐Ÿš You may want to use another shell than bash

zsh (Z Shell)

pacman -S zsh zsh-completions zsh-syntax-highlighting
chsh -s /usr/bin/zsh yourusername

fish (Friendly interactive shell)

pacman -S fish
chsh -s /usr/bin/fish yourusername

11. Reboot

exit
umount -R /mnt
telinit 6

12. Post installation

Set X11 Keymap

โŒจ๏ธ It is recommended to set this to your keymap. Some Display Managers and Desktops use this

localectl set-x11-keymap de

WiFi

๐Ÿ“ถ You may use the nmtui to configure your network profile

Oh my zsh

๐Ÿค– A handy framework for managing your zsh configuration

sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

AUR Setup

The Arch User Repository is a community-driven repository for Arch users. yay is a pacman wrapper that allows installing AUR packages

git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
cd .. && rm -r yay

If not all user dir's are present

๐Ÿ“ This will create your default folders (Downloads, Pictures, Documents, etc...)

yay -S xdg-user-dirs
xdg-user-dirs-update

If you want a graphical package manager

๐Ÿ“ฆ I recommend only to use yay to update and install packages but (especially if you are a beginner) you may want a graphical package manager

  • Simple GTK: yay -S gnome-packagekit
  • Simple Qt: yay -S apper
  • Complex GTK: yay -S pamac-aur
  • Complex Qt: yay -S octopi

If you use a GTK desktop and want Qt apps to use your GTK Theme

๐Ÿงฎ This may not look good with every GTK Theme

yay -S qt5-styleplugins
echo "export QT_QPA_PLATFORMTHEME=gtk2" >> ~/.profile

If you want to read APFS Partitions

๐Ÿ’ฝ If you have a Hackintosh installation you can use this to access your files from it

yay -S linux-apfs-dkms-git

Graphics card configuration tool

AMD

yay -S radeon-profile-git radeon-profile-daemon-git
systemctl enable --now radeon-profile-daemon

NVIDIA

yay -S nvidia-settings

Fonts:

General Fonts

๐Ÿ—› This are some essential font packages

yay -S ttf-dejavu ttf-opensans font-mathematica noto-fonts-emoji freetype2 terminus-font ttf-bitstream-vera ttf-dejavu ttf-droid ttf-fira-mono ttf-fira-sans ttf-freefont ttf-inconsolata ttf-liberation ttf-linux-libertine powerline-fonts

Nerd Fonts

๐Ÿ—š Fonts patched with a high number glyphs (icons) included (You may want this if you use powerline)

yay -S nerd-fonts-complete

Windows Fonts

๐Ÿ—› If you need the Windows/Microsoft fonts (f.e. for Office Suites)

git clone https://aur.archlinux.org/ttf-ms-win10.git
cd ttf-ms-win10
READ PKGBUILD and copy all windows files into the directory and run makepkg -si

macOS Fonts

๐Ÿ—š If you want the San Francisco Font by Apple

yay -S otf-san-francisco-pro

Nano syntax highlighting

๐Ÿ“ƒ This will add syntax highlighting to the nano text editor

yay -S nano-syntax-highlighting

Auto clean package cache

๐Ÿ—‘๏ธ This will clear the package cache to only keep 1 version after every action

Taken from https://sourceforge.net/projects/ezos/files/ArchStuff/

sudo mkdir /etc/pacman.d/hooks
sudo nano /etc/pacman.d/hooks/clean_package_cache.hook
[Trigger]
Operation = Upgrade
Operation = Install
Operation = Remove
Type = Package
Target = *
[Action]
Description = Cleaning pacman cache...
When = PostTransaction
Exec = /usr/bin/paccache -rk 1

13. Some fixes and tweaks

Compability tweaks

๐Ÿ› This will fix some bugs and compability issues

sudo ln -sf /usr/lib/libncursesw.so.6 /usr/lib/libtinfo.so.5

Spotify local files

yay -S ffmpeg-compat-57
yay -S ffmpeg

Fix on shutdown "Failed to start user manager service for user 174" (sddm)

sudo chage --expiredate -1 sddm

Force Google Emoji

sudo nano /etc/fonts/conf.d/50-user.conf
<fontconfig>
  <match target="pattern">
    <edit name="family" mode="prepend_first">
      <string>Icons</string>
    </edit>
  </match>
    
  <match target="pattern">
    <edit name="family" mode="prepend_first">
      <string>Noto Color Emoji</string>
    </edit>
  </match>
</fontconfig>

Desktop icons for nemo

gsettings set org.nemo.desktop show-desktop-icons true

About

My installation instructions for arch linux ๐Ÿ–ฅ๏ธ

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published