Warning
This is a work in progress.
TODO: fzf, nvm, delta, exiftool
This guide provides step-by-step instructions for setting up a complete development environment on Windows, including WSL, package managers, and essential tools.
- Prerequisites
- Package Managers
- Terminal and Shell Setup
- Development Tools
- WSL Setup
- Git Configuration
- Additional Configuration
Ensure your Windows system meets these requirements:
- Windows 10 version 2004+ or Windows 11
- At least 8GB RAM (16GB recommended)
- Virtualization enabled in BIOS
- Administrator access
# Set execution policy
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
# Install Scoop
$env:SCOOP = "$env:USERPROFILE\Scoop"
[Environment]::SetEnvironmentVariable('SCOOP', $env:SCOOP, 'User')
Invoke-RestMethod -Uri 'https://get.scoop.sh' | Invoke-Expression
# Add essential buckets
scoop install git
scoop bucket add extras
scoop bucket add nerd-fonts
# Update existing packages
winget upgrade --all --silent --include-unknown
# Install essential tools
winget install --id Microsoft.PowerShell
winget install --id Microsoft.PowerToys
winget install --id Microsoft.WindowsTerminal
# Install Maple Mono font (recommended)
scoop install Maple-Mono Maple-Mono-NF
# Alternative fonts
scoop install FiraCode-NF
scoop install CascadiaCode-NF
# Install Starship
scoop install starship
# Configure PowerShell profile
if (!(Test-Path -Path $PROFILE)) {
New-Item -ItemType File -Path $PROFILE -Force
}
# Add to PowerShell profile
Add-Content -Path $PROFILE -Value @"
# Initialize Starship
Invoke-Expression (&starship init powershell)
# Custom aliases
Set-Alias -Name g -Value git
Set-Alias -Name c -Value code
# Better directory navigation
function .. { Set-Location .. }
function ... { Set-Location ../.. }
"@
{
"profiles": {
"defaults": {
"colorScheme": "Vitesse Dark Soft",
"cursorShape": "underscore",
"font": {
"face": "Maple Mono NF",
"features": {
"cv02": 1,
"cv03": 1
}
},
"opacity": 80,
"useAcrylic": true
},
"list": [
{
"guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
"hidden": false,
"name": "PowerShell",
"source": "Windows.Terminal.PowershellCore",
"commandline": "pwsh.exe -NoLogo"
}
]
},
"schemes": [
{
"background": "#222222",
"black": "#393A34",
"blue": "#6394BF",
"brightBlack": "#777777",
"brightBlue": "#6394BF",
"brightCyan": "#5EAAB5",
"brightGreen": "#4D9375",
"brightPurple": "#D9739F",
"brightRed": "#CB7676",
"brightWhite": "#FFFFFF",
"brightYellow": "#E6CC77",
"cursorColor": "#DBD7CA",
"cyan": "#5EAAB5",
"foreground": "#DBD7CA",
"green": "#4D9375",
"name": "Vitesse Dark Soft",
"purple": "#D9739F",
"red": "#CB7676",
"selectionBackground": "#EEEEEE",
"white": "#DBD7CA",
"yellow": "#E6CC77"
},
{
"background": "#F1F0E9",
"black": "#121212",
"blue": "#296AA3",
"brightBlack": "#AAAAAA",
"brightBlue": "#296AA3",
"brightCyan": "#2993A3",
"brightGreen": "#1E754F",
"brightPurple": "#8A63D2",
"brightRed": "#AB5959",
"brightWhite": "#DDDDDD",
"brightYellow": "#BDA437",
"cursorColor": "#393A34",
"cyan": "#2993A3",
"foreground": "#393A34",
"green": "#1E754F",
"name": "Vitesse Light Soft",
"purple": "#6F42C1",
"red": "#AB5959",
"selectionBackground": "#222222",
"white": "#DBD7CA",
"yellow": "#BDA437"
}
]
}
# Install VS Code
winget install Microsoft.VisualStudioCode
# Essential extensions
code --install-extension ms-vscode-remote.remote-wsl
code --install-extension ms-vscode-remote.remote-containers
code --install-extension github.copilot
code --install-extension eamodio.gitlens
# Install Docker Desktop
winget install Docker.DockerDesktop
# Alternative: Docker in WSL
wsl -d Ubuntu-24.04 -u root bash -c '
apt update && apt upgrade -y
curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh
usermod -aG docker $SUDO_USER
systemctl enable docker
systemctl start docker
'
# Install WSL with Ubuntu
wsl --install --distribution Ubuntu-24.04
wsl --set-default Ubuntu-24.04
wsl --update
# Configure WSL
$wslConfig = @"
[wsl2]
memory=8GB
processors=4
swap=2GB
localhostForwarding=true
[interop]
enabled=true
appendWindowsPath=false
"@
$wslConfigPath = "$env:USERPROFILE\.wslconfig"
Set-Content -Path $wslConfigPath -Value $wslConfig
# Create WSL backup directory
$wslPath = "E:\WSL"
New-Item -ItemType Directory -Path $wslPath -Force
# Export WSL distribution
wsl --shutdown
wsl --export Ubuntu-24.04 "$wslPath\Ubuntu-24.04.tar"
wsl --unregister Ubuntu-24.04
wsl --import Ubuntu-24.04 "$wslPath\Ubuntu-24.04" "$wslPath\Ubuntu-24.04.tar"
wsl --set-default Ubuntu-24.04
#!/bin/bash
# Install Delta and ExifTool
VERSION=$(curl -s "https://api.github.com/repos/dandavison/delta/releases/latest" | grep -Po '"tag_name": "\K.*?(?=")')
wget "https://github.com/dandavison/delta/releases/download/${VERSION}/git-delta_${VERSION}_amd64.deb"
sudo dpkg -i git-delta_${VERSION}_amd64.deb
sudo apt install -y exiftool
rm git-delta_${VERSION}_amd64.deb
# Create repository structure
mkdir -p ~/Code/{GitHub,GitLab,BitBucket}
# Configure repository-specific settings
for repo in GitHub GitLab BitBucket; do
git config --global --add "includeIf.gitdir:$HOME/Code/$repo/**/.git.path" "$HOME/Code/$repo/.gitconfig"
done
# Configure fetch specs
git config --file="$HOME/Code/GitHub/.gitconfig" --add remote.origin.fetch "+refs/pull/*/head:refs/remotes/origin/pull_requests/*"
git config --file="$HOME/Code/GitLab/.gitconfig" --add remote.origin.fetch "+refs/merge-requests/*/head:refs/remotes/origin/merge_requests/*"
git config --file="$HOME/Code/BitBucket/.gitconfig" --add remote.origin.fetch "+refs/pull-requests/*/from:refs/remotes/origin/pull_requests/*"
# Install GPG
scoop install sudo
sudo scoop install gpg4win
# Configure GPG in WSL
wsl -d Ubuntu-24.04 bash -c '
echo "export GPG_TTY=$(tty)" >> ~/.bashrc
echo "export GPG_TTY=$(tty)" >> ~/.zshrc
'
# Install and configure ZSH
sudo apt install -y zsh curl git
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
curl -sS https://starship.rs/install.sh | sh
# Add to ~/.zshrc
cat << 'EOF' >> ~/.zshrc
eval "$(starship init zsh)"
# Custom aliases
alias g='git'
alias c='code'
alias d='docker'
alias dc='docker compose'
# Better directory navigation
alias ..='cd ..'
alias ...='cd ../..'
EOF
-
WSL Installation Fails
- Enable Virtual Machine Platform:
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all
- Enable WSL:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all
- Enable Virtual Machine Platform:
-
Docker Issues
- Reset Docker:
wsl --shutdown && net stop com.docker.service
- Clear Docker data:
rm -rf ~/.docker
(both in Windows and WSL)
- Reset Docker:
-
GPG Signing Issues
- Ensure GPG agent is running:
gpg-agent --daemon
- Check key availability:
gpg --list-secret-keys --keyid-format LONG
- Ensure GPG agent is running: