-
Notifications
You must be signed in to change notification settings - Fork 2
5.Post installation
- Connect to the wifi (command line)
- Activate TRIM for SSDs
- Fix /data ownership
- Install nvidia drivers
- Configure Linux LTS
- nVidia (DKMS option for Wayland)
- Install and configure Git
- Install and configure Paru (AUR heper)
-
Install
reflector
to manage/etc/pacmand.d/mirrorlist
automatically - Configure Google DNS
- Install fonts
- Install useful command line tools
- Configure Fish
- Configure Zsh
This part follows closely the Arch wiki Installation Guide, and covers the parts called Post installation (i.e General recommendations) in the wiki.
The goal is to reach a fully functional command line environment. Desktop environment installation will be covered in the next page.
![laptop](laptop.png)
ping -c 3 www.google.com (1)
nmcli dev wifi connect <SSID> password “<password>” (2)
ping -c 3 www.google.com (3)
-
this should fail as the wifi is off
-
replace <SSID> and <password>
-
this should succeed
![workstation](workstation.png)
sudo pacman -S linux-headers
sudo pacman -S nvidia libglvnd nvidia-utils opencl-nvidia nvidia-settings
sudo vim /etc/mkinitcpio.conf
-
Edit the MODULES line
MODULES=(nvidia nvidia_modeset nvidia_uvm nvidia_drm)
sudo vim /boot/loader/entries/arch.conf
-
Add to options line
nvidia-drm.modeset=1 nvidia-drm.fbdev=1
sudo mkinitcpio -P
sudo reboot
-
After reboot, launch
nvidia-smi
to test if all cards are detected
Note : only do this on dual boot systems if you have extended the size of Windows EFI partition. 2 kernels take ~116MiB, which won’t fit on the standard 100MiB size.
The goal here is to have a backup kernel (using the LTS version) in case a kernel update creates any issues.
sudo pacman -S linux-lts linux-lts-headers
cd /boot/loader/entries
sudo cp arch.conf arch-lts.conf
sudo vim arch-lts.conf
-
Modify the file as follows, paying attention to the "-lts" suffixes
title Archlinux LTS
linux vmlinuz-linux-lts
initrd /intel-ucode.img
initrd /initramfs-linux-lts.img
options root=PARTUUID=xxxxxxxxxxxx rw nvidia-drm.modeset=1 nvidia-drm.fbdev=1 #this line is the same for both kernels. Don't modify the xxxxxxxx part
cd .. #(goes to /boot/loader)
sudo vim loader.conf #this option will provide options at boottime
-
Modify the file as follows :
timeout 5 (uncomment this line)
console-mode keep
#default xxxxxxxxxxxx #comment this line
default arch
mkinitcpio -P
sudo bootctl update
sudo bootctl status
Reference: https://wiki.hyprland.org/Nvidia/
sudo pacman -S nvidia-dkms (1)
-
Works both for nvidia and nvidia-lts
sudo systemctl enable nvidia-suspend.service
sudo systemctl enable nvidia-hibernate.service
sudo systemctl enable nvidia-resume.service
I use paru as my AUR helper of choice as it is a maintained successor of Yaourt.
Make sure that CombinedUpgrade, UpgradeMenu, NewsOnUpgrade are activated. Add SkipReview
sudo vim /etc/paru.conf
This enables colored output and parallel download.
sudo vim /etc/pacman.conf
#Uncomment the line Color
#Uncomment the line ParallelDownloads = 5
paru -S reflector
As a service :
cd /etc/xdg/reflector
sudo rm reflector.conf
sudo curl -L -O "https://raw.githubusercontent.com/Jubijub/arch-config/master/etc/xdg/reflector/reflector.conf"
sudo systemctl start reflector.service
reflector.conf
# Reflector configuration file for the systemd service.
#
# Empty lines and lines beginning with "#" are ignored. All other lines should
# contain valid reflector command-line arguments. The lines are parsed with
# Python's shlex modules so standard shell syntax should work. All arguments are
# collected into a single argument list.
#
# See "reflector --help" for details.
# Recommended Options
# Set the output path where the mirrorlist will be saved (--save).
--save /etc/pacman.d/mirrorlist
# Select the transfer protocol (--protocol).
--protocol https
# Select the country (--country).
# Consult the list of available countries with "reflector --list-countries" and
# select the countries nearest to you or the ones that you trust. For example:
--country Switzerland,France,Germany
# Use only the most recently synchronized mirrors (--latest).
#--latest 5
# Sort the mirrors by synchronization time (--sort).
--sort rate
Manual launch :
sudo reflector --country Switzerland --age 24 --protocol https --sort rate --verbose --save /etc/pacman.d/mirrorlist
# this will fetch the latest servers from CH, speed rank them, then write the result to mirrorlist
cd /etc/pacman.d/hooks
sudo curl -L -O "https://raw.githubusercontent.com/Jubijub/arch-config/master/etc/pacman.d/hooks/mirrorupgrade.hook"
sudo vim /etc/pacman.d/hooks/mirrorupgrade.hook
-
Edit the file so that it contains :
[Trigger]
Operation = Upgrade
Type = Package
Target = pacman-mirrorlist
[Action]
Description = Updating pacman-mirrorlist with reflector and removing pacnew...
When = PostTransaction
Depends = reflector
Exec = /bin/sh -c "reflector --country Switzerland --age 24 --protocol https --sort rate --verbose --save /etc/pacman.d/mirrorlist;
rm -f /etc/pacman.d/mirrorlist.pacnew"
paru -S openresolv dnsutils
cd /etc
sudo curl -L -O "https://raw.githubusercontent.com/Jubijub/arch-config/master/etc/resolvconf.conf"
sudo vim /etc/resolvconf.conf
-
Edit name_servers line so that it contains
name_servers="8.8.8.8 8.8.4.4 2001:4860:4860::8888 2001:4860:4860::8844"
sudo vim /etc/NetworkManager/conf.d/rc-manager.conf
-
Add to the file
/etc/NetworkManager/conf.d/rc-manager.conf
[main] #(warning : this is case sensitive)
rc-manager=resolvconf
sudo resolvconf -u
sudo systemctl restart NetworkManager.service
cat /etc/resolv.conf
-
Verify the file looks like this
#Generated by resolvconf
search home nameserver 8.8.8.8
nameserver 8.8.4.4
nameserver 2001:4860:4860::8888
nameserver 2001:4860:4860::8844
nameserver 192.168.1.254
dig www.google.com
#Verify which server is used (look for line :: SERVER: 8.8.8.8 )
dig -6 www.google.com
#Verify which server is used (look for line :: SERVER 2001:4860:4860::8888 )
Nerd fonts are well known monospace coding & terminal fonts (JetBrains Mono, FiraCode, Inconsolatas, Droid Mono, etc…) patched with extra glyphs. See Nerd fonts Github. Installing these fonts is the last thing required to have a fully functional Tide Fish prompt.
Warning
|
Make sure you use at least version 2.1 as it fixes a bug with monotype fonts |
Fonts are packaged individually, and usually follow the pattern ttf-<name of the nerd font>-nerd.
paru -S ttf-jetbrains-mono-nerd
paru -S ttf-cascadia-code-nerd
paru -S ttf-hack-nerd
paru -S ttf-firacode-nerd
Since my zsh
and fish
config use those tools, installing them will fix the errors about those tools missing.
pacman -S bat eza fd fzf ripgrep btop
-
bat`
is a replacement ofcat
with syntax higlighting, line numbers, etc… -
eza
is a replacement ofls
with better coloring, Git support, etc… (eza is a fork of exa which is no longer supported) -
fd
is an enhancedfind
with a simpler syntax. -
fzf
is a fuzzy search tool, to search with partial names. -
ripgrep
is agrep
replacement. -
btop
is atop
replacement.
cd ~/Download
git clone https://github.com/catppuccin/bat.git
cd bat
mkdir -p "$(bat --config-dir)/themes"
cp *.tmTheme "$(bat --config-dir)/themes"
bat cache --build
bat --list-themes
Edit ~/.config/bat/config
--theme="Catppuccin-mocha"
For Zsh :
mkdir ~/.zfunc
cd ~/.zfunc
curl -L "https://raw.githubusercontent.com/ogham/exa/master/completions/zsh/_exa" -O
For Fish :
mkdir -p ~/.config/fish/completions
cd ~/.config/fish/completions
curl -L "https://raw.githubusercontent.com/ogham/exa/master/completions/fish/exa.fish" -O
Verify .zshrc
alias exa"exa --color --time-style=long-iso"
alias ls="exa"
alias la="ls --long --header --icons"
alias lg="ls --long --header --icons --git"
Verify config.fish
alias exa"exa --color --time-style=long-iso"
alias ls="exa"
alias la="ls --long --header --icons"
alias lg="ls --long --header --icons --git"
I use Fish as my main shell for its amazing completions, and build in features (suggestions, etc…).
curl -sL https://git.io/fisher | source && fisher install jorgebucaran/fisher
Reference: Github Catppuccin Fish
fisher install catppuccin/fish
fish_config theme save "Catppuccin Mocha"
fisher install PatrickF1/fzf.fish
Create ~/.config/fish/functions/fish_user_key_bindings.fish
function fish_user_key_bindings
fzf_key_bindings
end
Verify ~/.config/fish/config.fish
# fzf
set -Ux FZF_DEFAULT_OPTS "\
--height 20% --border \
--preview 'bat --style=numbers --color=always --line-range :500 {}' \
--color=bg+:#363a4f,bg:#24273a,spinner:#f4dbd6,hl:#ed8796 \
--color=fg:#cad3f5,header:#ed8796,info:#c6a0f6,pointer:#f4dbd6 \
--color=marker:#f4dbd6,fg+:#cad3f5,prompt:#c6a0f6,hl+:#ed8796"
paru -S starship
starship preset nerd-font-symbols -o ~/.config/starship.toml
I use Zsh when a POSIX-compliant alternative is required, or when I used something that doesn’t support Fish well, due to its amazing completion capabilities, and the superb command line theme Powerlevel10k.
note : configuration is shown for information only.
If you use my .zshenv
and .zshrc
files, all the plugins will be
configured already.
Reference: Github Catppuccin zsh
cd ~/Downloads
git clone https://github.com/catppuccin/zsh-syntax-highlighting.git
cd zsh-syntax-highlighting/themes/
mkdir ~/.zsh
cp -v catppuccin_mocha-zsh-syntax-highlighting.zsh ~/.zsh/
Edit .zshrc
source ~/.zsh/catppuccin_mocha-zsh-syntax-highlighting.zsh
paru -S zsh-completions zsh-autosuggestions zsh-fast-syntax-highlighting fzf zsh-theme-powerlevel10k
Add to .zshrc
source /usr/share/zsh/plugins/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh
fast-theme free
Add to .zshrc
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.plugin.zsh
Add to .zshrc
#fzf
source /usr/share/fzf/key-bindings.zsh
source /usr/share/fzf/completion.zsh
Add to .zshenv
#Catpuccin Mocha theme
export FZF_DEFAULT_OPTS="--height 20% --border \
--preview 'bat --style=numbers --color=always --line-range :500 {}' \
--color=bg+:#363a4f,bg:#24273a,spinner:#f4dbd6,hl:#ed8796 \
--color=fg:#cad3f5,header:#ed8796,info:#c6a0f6,pointer:#f4dbd6 \
--color=marker:#f4dbd6,fg+:#cad3f5,prompt:#c6a0f6,hl+:#ed8796"
export MANPAGER="sh -c 'col -bx | bat -l man -p'"