DEV Community

Cover image for A Complete Beginner's Guide to Zsh Setup on WSL
Niloy Majumder
Niloy Majumder

Posted on

A Complete Beginner's Guide to Zsh Setup on WSL

bluefloyd • June 23rd 2025

If you're a new developer using WSL (Windows Subsystem for Linux) and want a terminal that feels fast, looks amazing, and helps you work smarter, setting up zsh with a few enhancements can completely change your workflow. In this blog post, I'll walk you through my complete Zsh setup on WSL, step-by-step.

zsh preview

🧰 Setup

  • Zsh (with Oh My Zsh)
  • Powerlevel10k theme
  • Plugins: Autosuggestions & Syntax Highlighting
  • Nerd Fonts
  • GUI Terminal & Dircolors themes
  • Useful dev aliases

Before diving into the ZSH setup, let's make sure you have WSL (Windows Subsystem for Linux) with Ubuntu installed on your system.

Verify WSL and Ubuntu Installation

Open your terminal (Command Prompt or PowerShell) and run the following command to check if WSL is installed:

wsl --list --verbose
Enter fullscreen mode Exit fullscreen mode

If Ubuntu is installed properly, you should see an output similar to this:

  NAME      STATE           VERSION
* Ubuntu    Running         2
Enter fullscreen mode Exit fullscreen mode

If you don’t have WSL or Ubuntu set up yet, you can install them by following Microsoft’s official guide here: Install WSL

Now get back into the main process.


🛠️ Step-by-Step Zsh Setup on WSL (Ubuntu)

1. Install Zsh & Oh My Zsh

sudo apt update
sudo apt install zsh -y
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
Enter fullscreen mode Exit fullscreen mode

2. Set Zsh as Your Default Shell

chsh -s $(which zsh)
Enter fullscreen mode Exit fullscreen mode

You may need to restart WSL for the change to apply.


3. Install Powerlevel10k Theme

Copy the following into your WSL terminal:

git clone --depth=1 https://github.com/romkatv/powerlevel10k.git \
  ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
Enter fullscreen mode Exit fullscreen mode

Then, edit ~/.zshrc:

ZSH_THEME="powerlevel10k/powerlevel10k"
Enter fullscreen mode Exit fullscreen mode

Run:

source ~/.zshrc
p10k configure
Enter fullscreen mode Exit fullscreen mode

For more theme

4. Install Nerd Font (for Icons)

Powerlevel10k needs a Nerd Font. I recommend MesloLGS NF:


5. Install Plugins

I didn't install so many plugins as I don't need many of them, so I only used plugins for editing text and a couple of plugins for formatting. However, if you need to install more plugins you can visit the list of extensions from here Zsh Plugins

Autosuggestions:

git clone https://github.com/zsh-users/zsh-autosuggestions \
  ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
Enter fullscreen mode Exit fullscreen mode

Syntax Highlighting:

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git \
  ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
Enter fullscreen mode Exit fullscreen mode

Add plugins to your ~/.zshrc:
Then find the plugins=(...) line and add:

plugins=(git zsh-autosuggestions zsh-syntax-highlighting)
Enter fullscreen mode Exit fullscreen mode

Then reload:

source ~/.zshrc
Enter fullscreen mode Exit fullscreen mode

🎨 Color Scheme (optional): Solarized Dark Dircolors Theme

git clone https://github.com/seebi/dircolors-solarized.git ~/.solarized-dircolors
cp ~/.solarized-dircolors/dircolors.ansi-dark ~/.dircolors
Enter fullscreen mode Exit fullscreen mode

In ~/.zshrc, add:

eval "$(dircolors -b ~/.dircolors)"
Enter fullscreen mode Exit fullscreen mode

Useful Developer Aliases

Add these to the bottom of your ~/.zshrc:

alias ll='ls -la --color=auto'
alias gs='git status'
alias ga='git add .'
alias gc='git commit -m'
alias gp='git push'
alias codehere='code .'
alias open='explorer.exe'
alias desktop='cd /mnt/c/Users/$USER/Desktop'
Enter fullscreen mode Exit fullscreen mode

Then reload the zsh config file:

source ~/.zshrc
Enter fullscreen mode Exit fullscreen mode

This setup turns your terminal into a beautiful, fast, and powerful command center for development. This is my first tech blog, since I'm also a newbie, trying to explore things, get ideas, and share this with the world, so I might have some mistakes. Pardon me. Thank you for reading.
If you give this setup a try, I’d love to hear your thoughts in the comments!

Connect with me:
Linkedin or GitHub!

Top comments (0)