WSL on Windows
Last updated 2026-08-20 · 7 notes · 5 tags
Tags: wsl windows setup ubuntu getting-started
Sets up Ubuntu on WSL2 under Windows 11, then installs everyday tools. Work top to bottom. After each major install, use the Verify commands.
Note: Run Linux commands inside the Ubuntu terminal window, not in Windows PowerShell, unless a step says otherwise.
1. Enable WSL and install Ubuntu (Windows)
In PowerShell as Administrator:
wsl --install
Restart Windows if prompted. Open Ubuntu from the Start menu, create your UNIX username and password when asked.
Check that you are on WSL2:
wsl -l -v
Note: The VERSION column should show
2for your Ubuntu distro. If it shows1, run:wsl --set-version Ubuntu 2
2. Update Ubuntu
sudo apt update
sudo apt upgrade -y
sudo apt autoremove -y
Verify:
lsb_release -a
uname -a
3. Git
Git tracks file history in your projects.
sudo apt install git -y
git --version
4. GitHub CLI (gh)
Talks to GitHub from the terminal (login, repos, pull requests).
(type -p wget >/dev/null || sudo apt install wget -y)
wget -qO- https://cli.github.com/packages/githubcli-archive-keyring.gpg \
| sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg
sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" \
| sudo tee /etc/apt/sources.list.d/github-cli.list >/dev/null
sudo apt update
sudo apt install gh -y
gh --version
5. Python, pip, and venv
sudo apt install python3 python3-pip python3-venv -y
python3 --version
pip3 --version
Note: Prefer a virtual environment per project (see Python virtual environments). Avoid installing lots of packages globally with
pip.
6. pipx and uv
pipx installs Python CLI tools in isolation. uv is a fast tool for Python environments and packages.
sudo apt install pipx -y
pipx ensurepath
Close and reopen the Ubuntu terminal, then:
pipx --version
pipx install uv
uv --version
7. Node.js (LTS) with nvm
Node is used for many web and scripting tools. nvm makes it easier to install a current LTS version than the older packages in apt.
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
Restart the terminal, then:
nvm install --lts
node --version
npm --version
8. Cursor or VS Code on Windows
Install the Windows app:
- Cursor: https://cursor.com
- VS Code: https://code.visualstudio.com/
From Ubuntu, you can often open the current folder in VS Code with:
code .
Note: Install the WSL extension in VS Code if the editor offers it — that keeps files and the terminal aligned with Linux.
9. Ollama (optional — local AI models)
On Windows, the simplest path is the Windows installer: https://ollama.com
If you install the Windows app, you can call it from WSL with a helper alias later (see Bash aliases). A Linux install inside WSL also works:
curl -fsSL https://ollama.com/install.sh | sh
ollama --version
Pull a small model (optional):
ollama pull qwen3:4b
ollama list
10. Handy Linux utilities
sudo apt install tree zip unzip curl wget trash-cli ffmpeg jq -y
Verify a few:
tree --version
curl --version
trash-put --version
jq --version
Note:
trash-cligives you a Recycle Bin–style delete. Set it up in Safe delete before you rely onrm.
11. Git identity and GitHub login
git config --global user.name "Your Name"
git config --global user.email "you@example.com"
git config --list
gh auth login
gh auth status
12. Project folder
mkdir -p ~/projects
cd ~/projects
pwd
Note: Prefer storing project files under the Linux home (
~/projects/...), not under/mnt/c/..., for better performance in WSL.
13. Quick health check
git --version
gh --version
python3 --version
pip3 --version
pipx --version
uv --version
node --version
npm --version
tree --version
curl --version
wget --version
jq --version
ffmpeg -version
trash-put --version
Run ollama --version only if you installed Ollama.
14. Keeping things updated
sudo apt update
sudo apt upgrade -y
sudo apt autoremove -y
pipx upgrade-all
Note: Upgrade Node with
nvm install --ltswhen you want a newer LTS. Upgrade Ollama models withollama pull MODEL_NAME.
Common mistakes
- Password prompts in Ubuntu are for your Linux user — nothing appears as you type; that is normal.
- If
pipxornvmis “not found”, close the terminal fully and open Ubuntu again so your PATH reloads. - Windows paths in WSL look like
/mnt/c/Users/YOUR_WINDOWS_USERNAME/....
This content repository is based on the hands-on experience of Naveen Bachwani. AI tools were also used in augmenting and refining it. The goal is to help non-technical users get familiar with these tools, so they may be able to use them effectively.
Readers are responsible for using any commands or instructions provided here with appropriate caution. The creator of this site accepts no responsibility for system damage, data loss, or other consequences resulting from their use.