- Windows Subsystem for Linux, running on Windows 10 or newer
https://docs.microsoft.com/en-us/windows/terminal/install
To make Windows Terminal able to render the icons we're using in zsh later, we need to install the Nerd-Fonts on Windows. First, go to the Nerd-Font homepage and select a Font you like. Note that not all of them work well with all zsh themes, you may need to try out different ones. Fonts that work for me are Anonymice Nerd Font, Droid Sans Mono Nerd Font, and Hack Nerd Font. Then, extract the archive and install all of the .otf Font files.
Now we need to install the zsh shell in our wsl or wsl2. You can easily install it in the Ubuntu wsl by using the commands below. If you're using a different Linux distribution, you may check out the zsh documentation or your package a documentation.
We will also install oh-my-zsh which is a nice configuration extension to the zsh shell. That will allow us to easily customize anything, install a theme, and add plugins later.
sudo apt-get update && sudo apt-get upgrade -y
sudo apt install git zsh -y
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"Next, we will install the powerlevel10k theme, which really looks nice and offers great customization features. It also has a good configuration wizard that makes it extremely easy to set up the theme for your favorite design.
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/themes/powerlevel10k- To activate the theme you need to edit your
~/.zshrcfile in your personal folder.
vi .zshrcAnd
activate #zstyle ':omz:update' mode reminder removing #
activate #HIST_STAMPS="mm/dd/yyyy removing #
replace ZSH_THEME="robbyrussel with ZSH_THEME="powerlevel10k/powerlevel10k. After the change, you need to close and restart your terminal.
Because we want Windows Terminal to be able to render the icons in the powerlevel10k theme correctly, We need to change the Windows Terminal configuration to use the Nerd-Font we've downloaded before. Click on Settings in the Windows Terminal menu and select profile Defaults . Then in Additional Settings , Go to Appearance and select the font face that you are installed From Nerd-Fonts.
Example: Auto-Suggestion Plugin
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestionsExample: Syntax-Highlighting Plugin
git clone https://github.com/zsh-users/zsh-syntax-highlighting ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlightingTo enable the auto-suggestion and syntax-highlighting plugins or any other plugins in home directory, edit your ~/.zshrc file.
vi .zshrc
Simply change the default line plugins=(git) to plugins=(git sudo <optional-other-plugins>).
And
- Copy and Replace These Three Lines under the
plugins=(git sudo <optional-other-plugins>)
source $ZSH/oh-my-zsh.sh
source $ZSH_CUSTOM/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
source $ZSH_CUSTOM/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zshNote: If you encounter any issues or updates that require reconfiguring Powerlevel10k, you can easily do so using the following command:
p10k configure



