Bootstrap an Arch Linux Dev Machine: pacman, yay, and a Full Toolchain
Go from a fresh Arch install to a fully equipped dev environment — AUR helper, a slick shell prompt, and Node.js, Python, and Rust — in under an hour.
What You'll Build
Starting from a freshly installed Arch Linux system, you'll configure yay for AUR access, switch to zsh with a Starship prompt, and install Node.js, Python, and Rust — all ready to use within an hour.
Prerequisites
- A working Arch Linux install with a non-root user who has
sudoaccess (e.g., created viaarchinstallor manual setup) - An active internet connection
- Basic terminal familiarity; no prior Arch experience required
Step 1 — Update the System and Install Build Tools
Sync the package database, upgrade all installed packages, then grab the core build utilities:
sudo pacman -Syu
sudo pacman -S --needed base-devel git
-Syu syncs the package database (-y) and upgrades all packages (-u). base-devel is a package group containing gcc, make, fakeroot, and friends — required to compile AUR packages. --needed skips packages that are already current, so it is safe to run repeatedly.
Step 2 — Install yay (AUR Helper)
The Arch User Repository hosts thousands of community-maintained packages. yay builds and installs them automatically, with syntax that mirrors pacman.
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
cd ..
rm -rf yay
makepkg -si: -s pulls missing build dependencies via pacman; -i installs the finished package. After this, yay -S <pkg> installs from either official repos or the AUR, and yay -Syu updates everything at once.
Step 3 — Switch to zsh with Starship
zsh offers better tab-completion and scripting than bash. starship is a fast cross-shell prompt that displays git branch, language versions, and exit codes at a glance — both are in the official repos.
sudo pacman -S --needed zsh starship
chsh -s /usr/bin/zsh
echo 'eval "$(starship init zsh)"' >> ~/.zshrc
Nerd Font required: Starship renders icons (git branches, language symbols, exit-code indicators) using glyphs from a Nerd Font. Without one, the prompt will show broken boxes or question marks instead of icons. Install a Nerd Font from the official repos and configure your terminal to use it:
sudo pacman -S ttf-jetbrains-mono-nerdThen open your terminal emulator's preferences and set the font to JetBrainsMono Nerd Font. The exact setting name varies by emulator (e.g., Preferences → Profile → Font in GNOME Terminal).
Log out and log back in for the shell change to take effect. On next login your prompt will show Starship's default ❯ symbol with properly rendered icons.
Step 4 — Install Language Runtimes
# Node.js + npm
sudo pacman -S --needed nodejs npm
# Python 3 + pip
sudo pacman -S --needed python python-pip
# Rust toolchain manager
sudo pacman -S --needed rustup
rustup default stable
Multiple Node versions? Replace
nodejs npmwithyay -S fnm(Fast Node Manager) and follow the shell-setup instructions it prints.
Python packages: Arch enforces PEP 668, which blocks global
pip install. Usepython -m venv .venvinside each project directory instead of installing packages system-wide.
Verify It Works
Open a fresh terminal and run:
node --version # e.g., v22.x.x
python --version # e.g., Python 3.12.x
rustc --version # e.g., rustc 1.8x.x (stable)
yay --version # e.g., yay v12.x.x
You should also see the Starship prompt (❯) with properly rendered icons instead of the default $ or %.
Troubleshooting
| Symptom | Likely Cause | Fix |
|---|---|---|
makepkg fails with Cannot find the fakeroot binary |
base-devel not installed |
sudo pacman -S base-devel |
yay build fails with a GPG error |
Missing PGP key for package maintainer | Run gpg --recv-keys <KEY_ID> — the key ID appears in the error output |
chsh: PAM authentication failed |
Wrong password | Enter your user password, not root's |
rustup default stable hangs or fails |
Network or proxy issue | Verify connectivity; if behind a proxy, set HTTPS_PROXY before running the command |
Next Steps
- Faster mirrors:
sudo pacman -S reflector— auto-ranks mirrors by speed and writes a fresh/etc/pacman.d/mirrorlist - Dotfiles: Version-control
~/.zshrcand~/.config/starship.tomlin a git repo for reproducibility across machines - Editor:
sudo pacman -S neovimoryay -S visual-studio-code-binfor a full GUI editor - Go:
sudo pacman -S go— works out of the box with no extra toolchain setup required
Rachel has been embedded in the developer tooling ecosystem for nearly eight years, covering everything from IDE wars and package-manager drama to the quiet rise of AI-assisted coding. She has a soft spot for open-source maintainers and an unhealthy number of terminal emulators installed on a single laptop.
Discussion 0
No comments yet
Be the first to weigh in.