Skip to main content
Back to blog

Setting up a development machine from scratch

·3 min readDeveloper Tools

I reinstall my OS more often than most people. Sometimes to try a new setup, sometimes because I broke something experimenting, sometimes just to start clean. Having a repeatable setup process means this takes under an hour instead of a full day.

The OS: Pop!_OS

I install Pop!_OS for the reasons I have written about elsewhere: excellent hardware support, built-in tiling window manager, and it gets out of my way. The installer takes about 15 minutes.

First steps after install

# Update everything
sudo apt update && sudo apt upgrade -y
 
# Install essential tools
sudo apt install -y git curl wget build-essential
 
# Install Vivaldi browser
# Download the .deb from vivaldi.com, then:
sudo dpkg -i vivaldi-stable_*.deb

Development tools

# fnm (Fast Node Manager)
curl -fsSL https://fnm.vercel.app/install | bash
fnm install 22
fnm default 22
 
# pnpm
npm install -g pnpm
 
# Docker
curl -fsSL https://get.docker.com | sh
sudo usermod -aG docker $USER
 
# Git configuration
git config --global user.name "Jeremy Max"
git config --global user.email "career@jeremymax.com"
git config --global init.defaultBranch main

Editor: VSCodium

# Install VSCodium
wget -qO - https://gitlab.com/nicedad/vscodium-deb/-/raw/master/pub.gpg | sudo apt-key add -
echo 'deb https://download.vscodium.com/debs vscodium main' | sudo tee /etc/apt/sources.list.d/vscodium.list
sudo apt update && sudo apt install codium

My extensions are synced through a settings file in my dotfiles repo, but the essential ones:

  • ESLint
  • Prettier
  • GitLens
  • Tailwind CSS IntelliSense
  • Error Lens

Terminal setup

# Alacritty
sudo apt install alacritty
 
# tmux
sudo apt install tmux
 
# Zsh (if not default)
sudo apt install zsh
chsh -s $(which zsh)
 
# Starship prompt
curl -sS https://starship.rs/install.sh | sh
 
# Zsh plugins via zinit
bash -c "$(curl --fail --show-error --silent --location https://raw.githubusercontent.com/zdharma-continuum/zinit/HEAD/scripts/install.sh)"

Dotfiles restore

This is where the setup script pays off. My dotfiles repo has configs for Zsh, tmux, Alacritty, Starship, Git, and VSCodium:

git clone git@github.com:itsJeremyMax/dotfiles.git ~/dotfiles
cd ~/dotfiles
stow zsh tmux alacritty starship git

Five commands and my terminal, prompt, editor, and git are configured exactly how I like them. I wrote a separate post about managing dotfiles with GNU Stow.

SSH keys

# Generate a new key (or restore from backup)
ssh-keygen -t ed25519 -C "career@jeremymax.com"
 
# Add to SSH agent
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
 
# Copy public key to clipboard
cat ~/.ssh/id_ed25519.pub | xclip -selection clipboard

Add the public key to GitHub, my homelab servers, and any other services that need SSH access.

Verification

Before I consider the setup "done," I verify:

  1. git clone a private repo (SSH works)
  2. pnpm create next-app (Node and pnpm work)
  3. docker run hello-world (Docker works)
  4. Open VSCodium and check extensions loaded
  5. Check that tmux, Starship, and Zsh plugins are working

The whole process takes about 45 minutes, most of which is waiting for downloads and updates. Everything is documented and repeatable, which means I never hesitate to reinstall when I want a fresh start.

Sources

Enjoying the blog? Subscribe via RSS to get new posts in your reader.

Subscribe via RSS