Anto Subash.

Published on

Set up Wsl with zsh and oh-my-zsh

Table of contents

Setup Z Shell

Install the Z shell and git

1sudo apt install zsh
2sudo apt install git

Check the Z shell version

1zsh --version

Change the default shell

1chsh -s $(which zsh)

Log out and login again to use the new default shell

Check the current shell

1echo $SHELL // Expected result: /bin/zsh

Install Oh My Zsh

1sh -c "$(curl -fsSL"

Install zsh-autosuggestions and zsh-syntax-highlighting

Set up zsh-syntax-highlighting

  1. Clone this repository into $ZSH_CUSTOM/plugins (by default ~/.oh-my-zsh/custom/plugins):
1git clone ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

Set up zsh-autosuggestions

  1. Clone this repository into $ZSH_CUSTOM/plugins (by default ~/.oh-my-zsh/custom/plugins)
1git clone ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions


Oh My Zsh comes with a shitload of plugins for you to take advantage of. You can take a look in the plugins directory and/or the wiki to see what's currently available.

Enabling Plugins

Once you spot a plugin (or several) that you'd like to use with Oh My Zsh, you'll need to enable them in the .zshrc file. You'll find the zshrc file in your $HOME directory. Open it with your favorite text editor and you'll see a spot to list all the plugins you want to load.

1vi ~/.zshrc

For example, this might begin to look like this:

2  git
3  zsh-autosuggestions
4  zsh-syntax-highlighting

Load the config

1source ~/.zshrc