All Articles

Beginners guide to using ZSH in Windows 10

Just this morning while trying to make my command prompt look a bit more like linux using cmder, I quickly switched to Wesbos course on Command Line Power User

What struck me was the bash terminal he was using. It looked really pretty and I told me self, “I what something like this”. So in his course, he taught about Zsh & Z. I did a little study and research and soon got hooked up with Zsh terminal which is an extended Bourne Shell with a large number of improvements. I had to get it running on my system. But the problem was, I was using WINDOWS 10, OUCH!

But I determine to get it running, so I had two choices, Install Windows Linux Subsystem like or Cygwin. I went for both. (Laughing seriously here)

This is the final look of what I am trying to achieve: Zsh Prompt

To get started these are the steps I took

  1. Go to programs and features in your Control Panel

  2. Enable Windows Subsystem for Linux by clicking on Turn windows features on or off

Cpanel

  1. Visit Windows Store and install any Debain Flavor Distro you wish. I installed Ubuntu. Windows Store

  2. After installation, set a username and password and you are good to go

  3. Install Zsh

    sudo apt-get install zsh

  4. Visit Oh-my-Zsh home page and copy the installer links provider

  5. After installation, you will have a .zshrc file created in your home directory:

    ls -la ZSHRC

  6. Open with nano ~/.zshrc

  7. Change the ZSH_THEME from its default to

Check if the command prompt understands “agonster” fonts and its characters that were used by running this code in your command promt:

echo "\ue0b0 \u00b1 \ue0a0 \u27a6 \u2718 \u26a1 \u2699"

Visit Agonster for more understanding.

Note: To use Agonster Theme, you'll have to install Powerline Fonts

After all these, you are good to go.

If in doubt with all these steps, I will suggest you take a look at Wesbos CommandLine Course

There is just one error in the command prompt I’m trying to resolve and that’s the unicode \ue0a0 and hope to update this blog soon.

Till then, #KeepLearning

O! lest I forget, you can get a quick understanding on how to use ZSH by visiting this video on YouTube

update: I had to replace \ue0a0 to u0e0a inside the agonster theme by replacing PL_BRANCH_CHAR=$'\ue0a0'