Skip to content

The purpose of this tutorial and script is to install a stock Arch Linux with a minimal set of packages, tailored according to our specific needs.

License

Notifications You must be signed in to change notification settings

Neo-29/Architect

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ARCH LINUX POST-INSTALLATION TUTORIAL AND SCRIPT

Version Française / Versión Española / Versione italiana / deutsche Version

Presentation

Arch is a technical distribution aimed at a more advanced audience, consisting of "building blocks". Think of it like a set of blank Lego, with a base that you need to build and shape as you wish, and if you do it wrong, things can break.

The purpose of this tutorial is to install a stock Arch with a minimum of packages, according to our needs for office work and/or gaming.

Conditions

Note The script you will find later works regardless of your choices of DE / BOOT LOADER / FS. Tutorial and script aimed to be used with a pure Arch (incompatible with Garuda, EndeavourOS, Manjaro…)

Download the ISO: Arch Linux - Downloads

Table of Contents

  1. All-in-one script
  2. Tutorial
  3. Gaming
  4. Optimization
  5. Troubleshooting
  6. Community stuff

Arch Linux Post-Install Script

The purpose of this script is to configure a stock Arch system with a minimal set of packages tailored to your needs right after using archinstall. This script is oriented towards gaming.

Note

Before You Begin: This script is based on a tutorial that describes all the steps. This script is intended for use on a clean installation that has just been set up with archinstall. Before running this script, make sure you have booted into a Desktop Environment. It is not suitable for outdated computers. Ensure your hardware meets the requirements for the latest Nvidia drivers.

sudo pacman -Sy git
git clone https://github.com/Cardiacman13/Architect.git
cd Architect
./architect.sh

1. Optimizing Pacman

Enhance Pacman's functionality and user experience by making the following improvements:

  • Enabling colored output.
  • Enabling detailed package lists.
  • Enabling parallel downloads.
  • Enabling multilib support.

2. Adding Useful Aliases

Simplify your command-line tasks with these helpful aliases:

  • update-arch: Updates your system apps with a single command.
  • clean-arch: Cleans up your system by removing unused packages.
  • fix-key: Fixes key-related issues, ensuring a smooth update process.
  • update-mirrors: Updates your system's mirror list.

3. Assisting with AMD, NVIDIA, or Intel GPU Installation for Gaming

Get your gaming-ready with GPU setup, which includes:

  • Installing drivers.
  • Installing Vulkan libraries.
  • Installing 32-bit libraries.
  • Choosing between standard Nvidia drivers or the nvidia-all variant:
    • Nvidia: This is the recommended choice for most users. It involves:
      • Installing Nvidia DKMS and 32b libs packages.
    • Nvidia-all: This is for advanced users who know how to maintain it. It involves:
      • Cloning and installing from the Frogging-Family/nvidia-all repository.

4. Install Some Base Packages

Install fundamental packages for a complete experience:

  • yay or paru AUR helper.
  • Fonts.
  • Desktop utilities.
  • Codecs.
  • Other essential packages.

5. Miscellaneous Enhancements

Fine-tune your system for an enhanced experience:

  • Boostin vm.max_map_count to improve compatibility with Windows games. Arch wiki about vm-max-map-count
  • Ask you for Print support configuration.
  • Ask you for Buetooth configuration.
  • Advanced support for Xbox, PS4/PS5, 8bitdo controllers
  • Propose to configure Fish as a command-line shell.

6. Assisting with the Installation of Various Software

You have the freedom to choose which additional software to install based on your specific needs:

  • Discord
  • Steam
  • Lutris
  • Heroic Games Launcher
  • protonup-qt
  • Spotify
  • OBS Studio
  • LibreOffice
  • Gimp
  • Visual Studio Code
  • Open RGB

Elevate Your Desktop

Installation

Important

Follow the steps meticulously

Arch Linux Tutorial Part 1: Archinstall

For all the following steps, when you have text presented in this way, it will indicate a command to type in your terminal:

echo "Hello world !"            # Example command
  1. Set the keyboard to English

    loadkeys en
    
  2. Set up your Wi-Fi

    iwctl
    

    Then, replace YOUR-WIFI-NAME with the name of your wifi (SSID)

    station wlan0 connect YOUR-WIFI-NAME
    

    Enter your wifi password then quit to exit iwctl.

  3. Archinstall

    pacman -Syu archinstall     # update the archinstall script before installation
    archinstall                 # to launch the installation help script for arch linux
    

    /!\ The archinstall menu is subject to change with updates to the script /!\

Post-installation

Arch Linux Tutorial Part 2: Post Installation

Optimize pacman

  1. This modification allows for parallelization of package downloads. (PS: with kate, when you save, you might be asked to enter a password. Enter your root/sudo password.)

    sudo nano /etc/pacman.conf
    

    Uncomment (remove the # from the following lines):

    #Misc options
    #UseSyslog
    Color <-
    #NoProgressBar
    #CheckSpace
    VerbosePkgLists <- 
    ParallelDownloads = 5 <-
    
  2. Installing yay

    Yay is a handy tool for managing the installation and updating of software on Arch Linux-based systems. Yay especially makes it easier to use the AUR repository, a community-managed repository that significantly expands the available software library. This includes compiling these programs from their source, unless "-bin" is specified at the end of their name. /!\ Be cautious /!\ As the packages in AUR are community-provided, don't install just anything!

    sudo pacman -S --needed git base-devel
    git clone https://aur.archlinux.org/yay-bin.git
    cd yay-bin
    makepkg -si
    

    Adding support for updates of git packages. (Normally only needs to be done once)

    yay -Y --gendb
    yay -Y --devel --save
    
  3. Maintenance aliases:

Arch Linux Tutorial Part 4: Maintenance

This modification allows you to simply type “update-arch” in a terminal to update the system, “clean-arch” to clean it, or “fix-key” in case of an error with the gpg keys.

nano ~/.bashrc

Add each of these lines to the end of the file:

alias update-arch='yay -Syu && flatpak update'
alias clean-arch='yay -Sc && yay -Yc && flatpak remove --unused'
alias update-mirrors='sudo reflector --verbose --score 20 --fastest 5 --sort rate --save /etc/pacman.d/mirrorlist'
alias fix-key='sudo rm /var/lib/pacman/sync/* && sudo rm -rf /etc/pacman.d/gnupg/* && sudo pacman-key --init && sudo pacman-key --populate && sudo pacman -Sy --noconfirm archlinux-keyring && sudo pacman --noconfirm -Su'

Restart the terminal.

HARDWARE SUPPORT

NVIDIA (stay on X11 at least until the release of KDE 6)

Supplementary video explaining how to regain access to Wayland from GDM: Debian and Arch Linux Gnome Wayland with Nvidia (Debian in the doc)

  1. Install the core components:

    yay -S --needed nvidia-dkms nvidia-utils lib32-nvidia-utils nvidia-settings vulkan-icd-loader lib32-vulkan-icd-loader
    
  2. Enable nvidia-drm.modeset=1:

This setting allows the Nvidia module to be launched at startup.

  • If using systemd boot

In the folder:

/boot/loader/entries/

There are several .conf files, you need to add nvidia-drm.modeset=1 to the “options” line of each file. Example: options root=PARTUUID=fb680c54-466d-4708-a1ac-fcc338ed57f1 rw rootfstype=ext4 nvidia-drm.modeset=1

  • If using GRUB

    sudo nano /etc/default/grub
    

    Add nvidia-drm.modeset=1 to the "grub_cmdline_linux_default=" line

    Example: GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3 quiet nvidia-drm.modeset=1"

    Then:

    sudo grub-mkconfig -o /boot/grub/grub.cfg
    
  1. Load Nvidia modules as a priority at Arch launch: This step is sometimes necessary for certain desktop environments or window managers.

    sudo nano /etc/mkinitcpio.conf
    

    Modify the MODULES=() line to:

    MODULES=(nvidia nvidia_modeset nvidia_uvm nvidia_drm)
    

    If using btrfs:

    MODULES=(btrfs nvidia nvidia_modeset nvidia_uvm nvidia_drm)
    
  2. mkinitcpio Hook: This hook automates the rebuilding of initramfs (the basic boot file) with every Nvidia driver modification.

    sudo mkdir /etc/pacman.d/hooks/
    sudo nano /etc/pacman.d/hooks/nvidia.hook
    

    Add:

    [Trigger]
    Operation=Install
    Operation=Upgrade
    Operation=Remove
    Type=Package
    Target=nvidia-dkms
    Target=nvidia-470xx-dkms
    Target=usr/lib/modules/*/vmlinuz
    
    [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'
    
  3. Rebuilding initramfs: Since we've already installed the drivers at step 1, thus before setting up the hook, we need to manually trigger the initramfs rebuilding:

    mkinitcpio -P
    

AMD (do not do if Nvidia)

Install the core components:

yay -S --needed mesa lib32-mesa vulkan-radeon lib32-vulkan-radeon vulkan-icd-loader lib32-vulkan-icd-loader vulkan-mesa-layers lib32-vulkan-mesa-layers

INTEL (do not do if Nvidia)

Install the core components:

yay -S --needed mesa lib32-mesa vulkan-intel lib32-vulkan-intel vulkan-icd-loader lib32-vulkan-icd-loader intel-media-driver

Printers

  • Essentials
    yay -S --needed ghostscript gsfonts cups cups-filters cups-pdf system-config-printer
    avahi
    sudo systemctl enable --now avahi-daemon cups
    
  • Drivers
    yay -S --needed foomatic-db-engine foomatic-db foomatic-db-ppds foomatic-db-nonfree foomatic-db-nonfree-ppds gutenprint foomatic-db-gutenprint-ppds
    
  • HP Printers
    yay -S --needed python-pyqt5 hplip
    
  • Epson Printers
    yay -S --needed epson-inkjet-printer-escpr epson-inkjet-printer-escpr2 epson-inkjet-printer-201601w epson-inkjet-printer-n10-nx127
    

Bluetooth

The second command below asks systemd to immediately start the bluetooth service, and also to activate it on every boot.

yay -S --needed bluez bluez-utils bluez-plugins
sudo systemctl enable --now  bluetooth.service

PipeWire (son)

To have sound */!\ Say yes to everything to crush everything with the new packages. /!*

sudo pacman -S --needed pipewire lib32-pipewire pipewire-pulse pipewire-alsa pipewire-jack wireplumber alsa-utils alsa-firmware alsa-tools sof-firmware

BASIC SOFTWARE

Basic Components

Here you will find codecs, utilities, fonts, drivers:

yay -S --needed gst-plugins-bad gst-plugins-base gst-plugins-ugly gst-plugin-pipewire gstreamer-vaapi gst-plugins-good gst-libav gstreamer downgrade rebuild-detector mkinitcpio-firmware xdg-desktop-portal-gtk xdg-desktop-portal neofetch power-profiles-daemon lib32-pipewire hunspell hunspell-fr hunspell-en p7zip unrar ttf-liberation noto-fonts noto-fonts-emoji adobe-source-code-pro-fonts otf-font-awesome ttf-droid ntfs-3g fuse2fs exfat-utils fuse2 fuse3 bash-completion man-db man-pages

Miscellaneous Software

yay -S libreoffice-fresh libreoffice-fresh-fr vlc discord gimp obs-studio gnome-disk-utility visual-studio-code-bin

KDE Software

Here are various software for graphics, video (editing, codec support), graphical interface utilities, etc.

yay -S --needed xdg-desktop-portal-kde okular print-manager kdenlive gwenview spectacle partitionmanager ffmpegthumbs qt6-wayland kdeplasma-addons powerdevil kcalc plasma-systemmonitor qt6-multimedia qt6-multimedia-gstreamer qt6-multimedia-ffmpeg kwalletmanager

Additional Video: Customizing KDE Part 1 Layout, Theme, Kvantum, best practices!

Firewall

The default configuration may block access to printers and other devices on your local network. Here is a little link to help you: https://www.dsfc.net/infra/securite/configurer-firewalld/

sudo pacman -S --needed --noconfirm firewalld python-pyqt5 python-capng
sudo systemctl enable --now firewalld.service
firewall-applet &

Reflector for automatic mirror updates

yay -S reflector-simple

A command to generate a list of mirrors, to be done once after the first installation and repeated if you travel, or change countries, or if you find package downloading too slow, or if you encounter an error telling you that a mirror is down:

sudo reflector --verbose --score 20 --fastest 5 --sort rate --save /etc/pacman.d/mirrorlist

Timeshift

  • Timeshift is an open-source Linux utility for creating backups of your entire system.

/!\ WARNING: By default, only the system is backed up, not your user folder (/home/)! /!\

yay -S timeshift
  • Avoid timeshift and Btrfs on Arch, I've had issues before.

    “BTRFS snapshots are supported only on BTRFS systems having an Ubuntu-type subvolume layout.”

  • To enable automatic backups, you will need to start cronie. (optional)

    sudo systemctl enable --now cronie
    

Fish

Fish is a command-line shell designed to be interactive and user-friendly. See also ArchWiki on the subject. It replaces the default shell, bash.

  • Install fish.
    yay -S fish                       # 1. install fish
    chsh -s /usr/bin/fish             # 2. Set it as default.
    fish                              # 3. Run fish or reboot and it will default.
    fish_update_completions           # 4. Update completions.
    set -U fish_greeting              # 5. Remove welcome message.
    nano ~/.config/fish/config.fish   # 6. Create an alias as for bash at the beginning of this tutorial.
    
  • Then add the following aliases between if and end:
    alias update-arch='yay -Syu && flatpak update'
    
    alias clean-arch='yay -Sc && yay -Yc && flatpak remove --unused'
    
    alias update-mirrors=
    
    alias fix-key='sudo rm /var/lib/pacman/sync/* && sudo rm -rf /etc/pacman.d/gnupg/* && sudo pacman-key --init && sudo pacman-key --populate && sudo pacman -Sy --noconfirm archlinux-keyring && sudo pacman --noconfirm -Su'
    
  • Reboot unless done in step 3, aliases of any kind only work after restarting the terminal.

Level Up Your Gaming

Steam

Note that AMD or Nvidia drivers must be installed beforehand as mentioned in the HARDWARE SUPPORT section.

yay -S steam

Lutris

Lutris is a FOSS (Free, Open Source) game manager for Linux-based operating systems. Lutris allows searching for a game or a platform (Ubisoft Connect, EA Store, GOG, Battlenet, etc.) and proposes an installation script that will configure what's needed for your choice to work with Wine or Proton.

sudo pacman -S lutris wine-staging

Additional Video: Setting up Lutris for Intel/Nvidia laptop

Advanced controller support

Advanced Linux driver for Xbox 360|One|S|X wireless controllers (supplied with Xbox One S) and a lot of other controllers like 8bitdo (xpadneo) (xone)

yay -S xpadneo-dkms 

Advanced Linux driver for PS4/PS5 controllers

yay -S ds4drv dualsensectl

Displaying in-game performance

MangoHud is a Vulkan and OpenGL overlay that allows monitoring system performance within applications and recording metrics for benchmarking. It's the tool you need if you want to see your in-game FPS, your CPU or GPU load, etc. Or even record these results in a file. Here, we install GOverlay which is a graphical interface to configure MangoHud.

yay -S goverlay

Improving compatibility of Windows games

We increase the default value of this variable, allowing for the storage of more "memory map areas". The default value is very low. The goal is to improve compatibility with Windows games via Wine or Steam (See ProtonDB), knowing that some poorly optimized games tend to reach this limit quickly, which can result in a crash.

Gaming LINUX supprimer les crashs / augmenter la compatibilité

Ajouter dans :

sudo nano /etc/sysctl.d/99-sysctl.conf

la ligne suivante: vm.max_map_count=16777216

Optimization:

Warning

This step is intended for advanced users ⭐

TKG is a highly customizable kernel build that provides a selection of fixes and tweaks to improve desktop and gaming performance.

Related video: Kernel TKG on Arch + Boost its perfs

git clone https://github.com/Frogging-Family/linux-tkg.git
cd linux-tkg
makepkg -si

Warning

This step is intended for advanced users ⭐

Just like the TkG kernel, but for Mesa, a patched version to add a few fixes and optimizations. Very useful for AMD players, of no interest to Nvidia players.

git clone https://github.com/Frogging-Family/mesa-git.git
cd mesa-git
makepkg -si

Say yes to everything to overwrite everything with new packages.

Warning

This step is intended for advanced users ⭐

Nvidia-all is an integration of the nvidia driver by TkG. It includes support patches for new kernels. It lets you select the driver version you want to install, whether it's the latest official version, a beta version, the Vulkan version, etc.

You're using Arch and Nvidia check this out!

git clone https://github.com/Frogging-Family/nvidia-all.git
cd nvidia-all
makepkg -si

Say yes to everything to overwrite everything with new packages.

Installation Flatpak

Formerly known as xdg-app, this is a software deployment and package management utility for Linux. It is promoted as offering a "sandbox" environment in which users can run software in isolation from the rest of the system.

MangoHUD, Goverlay, Steam, Lutris FLATPAK!

yay -S flatpak flatpak-kcm
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
flatpak install com.bitwarden.desktop com.discordapp.Discord com.github.tchx84.Flatseal com.gitlab.davem.ClamTk com.heroicgameslauncher.hgl com.microsoft.Edge com. moonlight_stream.Moonlight com.rtosta.zapzap com.spotify.Client com.sweethome3d.Sweethome3d com.tutanota.Tutanota com.valvesoftware.Steam com.visualstudio.code info.febvre. Komikku io.github.anirbandey1.ChatbotClient io.github.koromelodev.mindmate net.davidotek.pupgui2 net.lutris.Lutris one.flipperzero.qFlipper org.bleachbit.BleachBit org. gnome.Boxes org.gnome.OCRFeeder org.kde.gcompris org.kde.kdenlive org.libreoffice.LibreOffice org.videolan.VLC org.yuzu_emu.yuzu us.zoom.Zoom xyz.ketok.Speedtest

Troubleshooting

Arch Linux Part 3 the most common problems.

Arch Linux Part 4 Maintenance / updating

Arch Linux Part 5 Arch-Chroot

Sources

Sources and useful links :

Contribution

Contributions to this project are welcome! If you have suggestions, bug reports, or contributions, please open an issue or a pull request in the repository.

As you can see this project is available in French, English, Spanish, Italian & German. Translators are more than welcome ! 🧑‍🤝‍🧑

About

The purpose of this tutorial and script is to install a stock Arch Linux with a minimal set of packages, tailored according to our specific needs.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 100.0%