This tutorial is inspired by https://sourceforge.net/projects/ezos/files/ArchStuff/
- 1. Live Setup
- 2. Partitioning
- 3. Mounting accordingly
- 4. Base installation
- 5. Install Bootloader
- 6. Setup time/date and languages
- 7. Setup users
- 8. Install some useful packages
- 9. Install Desktop Environment
- 10. Install and enable Desktop Manager and some other useful stuff
- 11. Reboot
- 12. Post installation
- Set X11 Keymap
- WiFi
- Oh my zsh
- AUR Setup
- If not all user dir's are present
- If you want a graphical package manager
- If you use a GTK desktop and want Qt apps to use your GTK Theme
- If you want to read APFS Partitions
- Graphics card configuration tool
- Fonts:
- Nano syntax highlighting
- Auto clean package cache
- 13. Some fixes and tweaks
โจ๏ธ The default keymap is US. Available layouts can be listed with:
ls /usr/share/kbd/keymaps/**/*.map.gz
loadkeys de-latin1
๐ถ Use this tool to connect to your network
wifi-menu
๐ Ensure the system clock is accurate
timedatectl set-ntp true
ls /sys/firmware/efi/efivars
If the directory does not exist, the system may be booted in Legacy BIOS Mode
BIOS:
fdisk /dev/sdX
UEFI:
gdisk /dev/sdX
Universal + Graphical:
cfdisk /dev/sdX
- BIOS: You can use both but this guide uses DOS
- UEFI: You need to use GPT
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 |
Needed | Partition | Partition type | Mount point | Flags |
---|---|---|---|---|
โ | /dev/sdXY | Linux swap | - | - |
โ๏ธ | /dev/sdXY | Linux | /mnt | Bootable |
โ | /dev/sdXY | Linux | /mnt/home | - |
- At least: 150MB
- Recommended: 300MB
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 |
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
๐ฝ 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
๐ 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
โณ 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
Identify by UUID (better):
genfstab -U /mnt >> /mnt/etc/fstab
Identify by Labels:
genfstab -L /mnt >> /mnt/etc/fstab
arch-chroot /mnt
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
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
๐ 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
๐ 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
๐ You can tab-complete your stuff after zoneinfo
ln -sf /usr/share/zoneinfo/Region/City /etc/localtime
hwclock --systohc --utc
nano /etc/pacman.conf
Uncomment multilib (๐ฌ and add ILoveCandy to Misc section)
pacman -Syu
๐ Use a strong and complicated password
passwd
๐ง 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
EDITOR=nano visudo
Uncomment %wheel ALL=(ALL) ALL
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
๐จ๏ธ Add some packages needed for printing
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
pacman -S hplip
๐ฅ๏ธ Xorg is the display server we will use
pacman -S xorg-server xorg-xinit xorg-xrandr xorg-xfontsel xorg-xkill
๐ 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
pacman -S lxde
pacman -S lxqt breeze-icons pcmanfm-qt qterminal lxqt-sudo polkit-qt5
pacman -S gnome gnome-extra
pacman -S cinnamon nemo-fileroller
pacman -S plasma plasma-wayland-session konsole dolphin gwenview ark kate okular
pacman -S xfce4 xfce4-goodies
pacman -S budgie-desktop gnome
pacman -S mate mate-extra
pacman -S deepin deepin-extra
nano /etc/lightdm/lightdm.conf
greeter-session=lightdm-deepin-greeter
๐ฅ๏ธ A display manager is basically your login screen where you enter your user details and select your Desktop Environment
pacman -S lxdm
systemctl enable lxdm
pacman -S sddm
systemctl enable sddm
pacman -S gdm
systemctl enable gdm
pacman -S lightdm lightdm-gtk-greeter
systemctl enable lightdm
pacman -S xorg-drivers mesa lib32-mesa
pacman -S nvidia lib32-nvidia-utils
pacman -S vulkan-radeon lib32-vulkan-radeon
๐ง This are essential networking tools
pacman -S networkmanager networkmanager-openvpn networkmanager-pptp dnsmasq
systemctl enable NetworkManager
๐ถ 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
๐๏ธ 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
๐ 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
๐ You may want to use another shell than bash
pacman -S zsh zsh-completions zsh-syntax-highlighting
chsh -s /usr/bin/zsh yourusername
pacman -S fish
chsh -s /usr/bin/fish yourusername
exit
umount -R /mnt
telinit 6
โจ๏ธ It is recommended to set this to your keymap. Some Display Managers and Desktops use this
localectl set-x11-keymap de
๐ถ You may use the nmtui
to configure your network profile
๐ค A handy framework for managing your zsh configuration
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
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
๐ This will create your default folders (Downloads, Pictures, Documents, etc...)
yay -S xdg-user-dirs
xdg-user-dirs-update
๐ฆ 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
๐งฎ This may not look good with every GTK Theme
yay -S qt5-styleplugins
echo "export QT_QPA_PLATFORMTHEME=gtk2" >> ~/.profile
๐ฝ If you have a Hackintosh installation you can use this to access your files from it
yay -S linux-apfs-dkms-git
yay -S radeon-profile-git radeon-profile-daemon-git
systemctl enable --now radeon-profile-daemon
yay -S nvidia-settings
๐ 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
๐ Fonts patched with a high number glyphs (icons) included (You may want this if you use powerline)
yay -S nerd-fonts-complete
๐ 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
๐ If you want the San Francisco Font by Apple
yay -S otf-san-francisco-pro
๐ This will add syntax highlighting to the nano text editor
yay -S nano-syntax-highlighting
๐๏ธ 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
๐ This will fix some bugs and compability issues
sudo ln -sf /usr/lib/libncursesw.so.6 /usr/lib/libtinfo.so.5
yay -S ffmpeg-compat-57
yay -S ffmpeg
sudo chage --expiredate -1 sddm
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>
gsettings set org.nemo.desktop show-desktop-icons true