Skip to content

Instantly share code, notes, and snippets.

@jansanchez
Last active April 18, 2026 20:39
Show Gist options
  • Select an option

  • Save jansanchez/489cb6a33a4d00ed998e0e27553f459a to your computer and use it in GitHub Desktop.

Select an option

Save jansanchez/489cb6a33a4d00ed998e0e27553f459a to your computer and use it in GitHub Desktop.
WSL Setup

WSL Setup

Guía completa para replicar entorno Linux profesional en Windows usando WSL + chezmoi + Neovim + zsh.


1. Instalar WSL

Abrir PowerShell como administrador:

wsl --install

Reiniciar el equipo.


2. Verificar distros

wsl --list --verbose

Si no aparece Ubuntu:

wsl --install -d Ubuntu-24.04

3. Configurar Ubuntu

Abrir desde el menú:

Ubuntu

Crear usuario:

username: jan
password: ********

4. Actualizar sistema

sudo apt update && sudo apt upgrade -y

5. Instalar chezmoi

cd ~
mkdir -p ~/.local/bin

sh -c "$(curl -fsLS get.chezmoi.io)" -- -b "$HOME/.local/bin"

export PATH="$HOME/.local/bin:$PATH"
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc

Verificar:

chezmoi --version

6. Aplicar dotfiles

chezmoi init https://github.com/jansanchez/dotfiles
chezmoi apply

7. Ejecutar instalación manual (si falla apt)

sudo bash ~/.local/share/chezmoi/run_once_install-packages.sh.tmpl
bash ~/.local/share/chezmoi/run_once_install-tools.sh.tmpl

8. Activar zsh

chsh -s $(which zsh)
exec zsh

9. Configurar mise en zsh

echo 'eval "$($HOME/.local/bin/mise activate zsh)"' >> ~/.zshrc

10. Crear workspace

mkdir -p ~/projects
cd ~/projects

11. Verificar herramientas

which zsh
which nvim
which tmux
which starship
which mise

12. Abrir Neovim

nvim

Esperar instalación automática de LazyVim.


Flujo diario

wsl
cd ~/projects
nvim .

⚠Buenas prácticas

NO usar:

/mnt/c/

usar:

~/projects

Docker (opcional)

Desde WSL:

docker run -it ubuntu:24.04 bash

Arquitectura final

Windows (host) └── WSL (Ubuntu) ├── zsh ├── nvim (LazyVim) ├── tmux ├── mise └── ~/projects

Docker └── containers para testing


Insight

WSL = tu sistema operativo real Docker = tus entornos aislados chezmoi = tu configuración portable


Comandos clave

chezmoi apply
chezmoi edit ~/.zshrc
chezmoi update

Checklist final

  • WSL instalado
  • Ubuntu configurado
  • chezmoi funcionando
  • dotfiles aplicados
  • zsh activo
  • nvim funcionando
  • ~/projects creado
  • entorno limpio
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment