Archlinux on river/sway from scratch with the most minimal dependencies. DIY is awesome
- ESP /efi should be 2GiB if you plan on installing efi applications like arch rescue else 512MiB otherwise
- ROOT should be a (xfs for hdd | f2fs for nvme) with a size of 30GiB - 60GiB
- HOME & FILES (btrfs | ext4) partition with HOME between 60-120GiB and FILES of arbitrary size for multimedia content
- ROOT is mounted on
/with the dedicated HOME &| FILES subvolume | partition mounted to/homeand/home/${username}/filesrepectively. - Setup zram
3xRAM size to allow running more memory hungry tasks.eg compiling llvm, clang, clang-tools, lldb. - Use a ZRAM backing device equal to RAM size 12GiB and a swap partition for hibernation also of size equal to RAM 12Gib
NOTE:
- make sure to create and mount Btrfs with Zstd compression on first mount during installation
- format & mount all drives with a logical sector or block size of 4096
- Configure mkinitcpio linux-zen.preset to generate a efi uki image
- Use /efi as ESP partition and set systemd-boot loader.conf to your efi uki (unified kernel image) image
- Extend mkinitcpio image generation with zstd compression and add kernel cmdline parameters
- Enable systemd-boot as boot manager (
bootctl install) - Enable iwd, systemd-networkd, systemd-resolved system services
- Enabling
systemd-boot-updateservice to update systemd-boot on systemd upgrade - river/sway as window manager with swayidle and waylock for idle and lock
management and levee/yambar for bar management
- base
- xfsprogs | f2fs-tools | btrfs-progs | dosfstools | exfatprogs
- intel-ucode microcode
- iwd for wifi
- ghostty/kitty/foot terminal
- Install only needed linux-firmware, check firmwares you might need with
lspciand use dynamic debug to know more details about the exact firmwares loaded at kernel startup - linux-zen
- intel-media-driver for hardware video acceleration
- polkit for seat and privileged access management
- man-db and man-pages and enable man-db.timer service
- Set up GPG with SSH authentication enabled
- helix/neovim for config clone awesome-helix to $XDG_CONFIG_HOME/helix or awesome-neovim to $XDG_CONFIG_HOME/nvim
- sudo
- elvish/fish (set default shell with
chsh -s $(which shellname))
- iwd for wifi and enable its builtin dhcp client
- symlink /run/systemd/resolve/stub-resolv.conf to /etc/resolv.conf for DNS resolution
- setup reflector for choosing the fastest Pacman mirror list
- Configure network using systemd-networkd and systemd-resolved
- Setup vconsole terminal fonts
- On the freshly installed system, use the following fonts
- use fonts with great unicode support, like
ttf-dejavuornoto-fontsas the system default font - ttf-jetbrains-mono or ttc-iosevka for monospace,
- ttf-nerd-fonts-symbols-mono for nerd font symbols and noto-font-emoji for emoji
NOTE: don't forget to
ln -s /usr/share/fontconfig/conf.avail/10-nerd-font-symbols.conf /etc/fonts/conf.d/ - use fonts with great unicode support, like
- configure Intel_graphics hardware acceleration
- setup laptop, zram, disk, network and power management options using udev rules, sysctl and modprobe config
- Configure hibernation by adding resume kernel parameter, resume hook to mkinitcpio, and rebuilding kernel
- Enable Active State Power Management
if supported and add or remove
powersave > /sys/module/pcie_aspm/parameters/policyfrom udev powersave rules based on the results - Configure sudo for current user using
sudo -E visudo -sf /etc/sudoers.d/${username}. Example sudoers file - Configure logind, journald and sleep
- For extra Performance Improvements
- For pacman, enable the following options under the option section in /etc/pacman.conf
[options]
Color
CheckSpace
VerbosePkgLists
ParallelDownloads = 5- Set up makepkg.conf and Increase /tmp tmpfs size to 90% of RAM by copying and changing the Options field of
Mountfrom the default size of 50% to 90% in the drop-in config file. This helps to prevent OOM when compiling clang on /tmpsudo -E systemctl edit tmp.mount --drop-in=hugetmp.mount
[Mount]
Options=
Options=mode=1777,strictatime,nosuid,nodev,size=90%%,nr_inodes=1mNOTE: This is to be used in conjunction with
zram
- base-devel for Basic c/c++ build tools to build Arch Linux packages
- mold as linker for C, Rust and C++
- lldb/gdb for debugging Zig, C, and C++
- clang/gcc for C++ development with clangd
- zig with zls for zig development
- rustup with default profile and rust-analyzer component for Rust development
- luajit for lua development
- iptables-nft and nftable(automatically installed as a dependency of iptables-nft) for firewall configuration (enable the nftables service)
- nmap and tcpdump for network analysis and auditing
- yay for AUR package management
- android-file-transfer with libmtp for connecting Android phones mtp management
- aria2 as download manager
- bat is a Cat clone with syntax highlighting and git integration
- bluez and bluez-utils for Bluetooth
- brightnessctl for controlling backlight
- carapace-bin for completions in elvish
- fzf for fuzzy search
- vivid for LS_COLORS
- starship for prompt
- Helix and Neovim awesomely set up with the relevant LSPs and static analyzers for
Zig,C,Rust,C++,Luajit,Python,Shell, andWeb-Development. - dictd server with dict client and some dictionary sources for yay like
dict-wikt-en-all,dict-freedict-eng-spa,dict-freedict-spa-eng,dict-foldoc,dict-gcide,dict-wn.- NOTE: to disable online mode, comment out
server dict.orgin /etc/dict/dict.conf - Make sure locale is properly configured in
DICTD_ARGSof /etc/conf.d/dictd else, the service unit will fail - Since dict uses en_US.UTF-8 by default, make sure to comment it out in /etc/locale.gen and compile it along side your locale of choice
es_MX.UTF-8
- NOTE: to disable online mode, comment out
- ffmpegthumbnailer & gnome-epub-thumbnailer for thumbnails
- firefox with speech-dispatcher (for Text-to-Speech) as pdf reader or zathura and firefox-ublock-origin as adblocker and foliate/fbreader as epub reader
- wlsunset for controlling screen blue light
- git for version control
- grim and slurp for screenshot
- mako as a lightweight notification daemon for Wayland
- docker for containerization of apps
- scrcpy for mirroring android device (with adb for copying to Android)
- libreoffice-fresh for working with openoffice documents and hunspell-en_us for spellcheck, for help setting up spellcheck
- mpd for music daemon, ncmpcpp for ui interface, and mpc for controlling playing
- mpv as multimedia player
- sound-theme-freedesktop for standard sounds and tones used in Linux
- pipewire and pipewire-audio for audio/video routing and processing, pipewire-pulse as pulseaudio replacement and WirePlumber as pipewire session manager
- lf as file manager
- fastfetch for displaying system information
- openssh and rsync for syncing files with a remote over ssh
- remmina as remote desktop client with a plugin like freerdp|libvncserver
- usb_modeswitch for enabling modem mode for zero-cd based modems
- wl-clipboard for wayland clipboard
- batsignal for battery status notifications
- kanshi for wayland output management
- fuzzel as the application launcher
- cliphist as clipboard history manager
- qt5-wayland for runing qt5 apps under wayland
- xdg-desktop-portal-wrl for WebRTC screen sharing
- xdg-utils to assist applications with desktop integration tasks
- yt-dlp YouTube downloader
- zoxide for efficient directory movement
- Enable Firefox Hardware video acceleration by setting media.ffmpeg.vaapi.enabled to true and Hardware WebRender by setting
gfx.webrender.alltotrueandmedia.hardware-video-decoding.force-enabledtotrue - Enable insert new tabs after current by setting
browser.tabs.insertAfterCurrenttotrue - Enable Firefox Profile on Ram when using zram/nvme/ssd
- Move Firefox disk cache to ram by setting
browser.cache.disk.parent_directoryto/run/user/1000/firefox - Increase session save interval from the default of 15 seconds (15000 milliseconds) to 30 minutes (1,800,000 milliseconds) by setting
browser.sessionstore.intervalto1800000 - Enable auto unloading of inactive tabs
- configure /etc/motd with the Message Of The Day Eg.
WELCOME MASTER MALPHA! WE ARE READY TO SERVE YOU!!! - Checkout Archlinux General Recommendation
- enable DNSOverTLS for resolved
- Enable synchronizing the system clock across the network by enabling systemd-timesyncd.service
- Disable journaling to persistent storage by setting Storage in journal.conf to volatile and masking
systemd-journal-flush.service - link kitty to xterm
- Enable DNS over HTTPS in Firefox
- modify relector configuration in /etc/xdg/reflector/reflector.conf to sort based on download rate with --sort rate
Install ArchLinux WSL on Windows 11 using wsl --install archlinux. After installing, follow these instructions to set up ArchLinux on WSL 2.
- Download and install a Nerd Font of your choosing, like IosevkaTerm and use it as your default font for Windows Terminal
- Install starship
winget install -e --id Starship.Starshipand addInvoke-Expression (&starship init powershell)to your $PROFILE as in Microsoft.PowerShell_profile - Run
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUserin PowerShell to enable running of scripts - Add the wheel group
groupadd -f wheelas it isn't available by default in Archlinux WSL - create a non-root user and add him to the wheel group
useradd -mG wheel -s /bin/elvish username - Set a password for your new user with
passwd username - To set a different host name, disable hostname generation, and set a static hostname in wsl.conf
- Configure sudoers file at /etc/sudoers.d/
username - clone this repo to
~/.config/dotfilesand symlink~/.config/dotfiles/config/elvishto~/.config/elvishto activate the elvish shell configuration - Configure makepkg and pacman
- Install yay for AUR management with
mkdir ~/aur ; cd ~/aur ; sudo pacman -S --needed git base-devel ; git clone https://aur.archlinux.org/yay-bin.git ; cd yay-bin ; makepkg -si - Install essential utilities like
man-db,man-pages',carapace-bin,batandfzf`
- To compile the WSL kernel, you need
base-devel,bc,cpio,pahole,python, andrsync. - Then set
swap=32GBin .wslconfig to ensure you can compile the kernel without running out of memory - Run
zcat /proc/config.gz | /bin/sed '/is not set/d' > .configto get a copy of all the set config used by the current WSL kernel - Run
env KCONFIG_CONFIG=Microsoft/config-wsl ./scripts/kconfig/merge_config.sh .configto merge.configwithMicrosoft/config-wsl, overriding options inMicrosoft/config-wsl. - Then
env KCONFIG_CONFIG=Microsoft/config-wsl make olddefconfigorenv KCONFIG_CONFIG=Microsoft/config-wsl make oldconfigto use default values for new kernel configs not in$E:KCONFIG_CONFIG. - ensure CONFIG_TUN=y and CONFIG_TAP=y are set in Microsoft/config-wsl to enable userspace networking used by podman and VPNs
- Use mold
set-env LD moldto link faster, this reduced the whole compile/link phase from about 1hr30min to 30min for me - follow instructions at updating wsl kernel
- At the end, you should have a .wslconfig like mine
To use pacman as the package manager for Termux follow these instructions If you want to compile AUR packages follow these instructions
- openssl-tool
- openssh
- zig
- rust
- golang
- python
- bsdtar
- fzf
- bat
- starship
- fastfetch
- git
- helix
- man