In this guide, you will learn how to run Linux natively on Windows. using WSL2. The really cool thing about WSL2 is that it will allow you to run bash on Windows and finally ditch the native command prompt, which let us admit, sucks!

With our new super-powers, we can install ZSH and Oh My Zsh. For those of you new to Z and Zsh, it's a new and improved shell. With the Zsh shell, you can also install Oh My Zsh. Oh My Zsh can be used to customize your terminal with themes and plugins which will allow you to become more efficient.

Intro & Overview

  • Windows for Linux Subsystem
  • Install a Linux Distribution - Ubuntu
  • Install Zsh
  • Install Oh My Zsh!
  • Pimp Up The Terminal

The Windows Vs Mac war has been raging on for decades.  I'm happy to admit I like both.  Yes, I can hear you silently judging me... I just don't care

If you ever hear a mac fan evangelize about how perfect a MAC is fr coding, then you will quickly hear how bash and the Linux terminal kicks the Windows command prompt ass.  It's all true it does.  The command prompt sucks.  thankfully Microsoft has been working on something sneaky.  You can now run a Linux kernel directly on windows

This video is split into several parts. The first part will install WSL and Ubuntu on my Windows desktop. Next, we will install Zsh and Oh My Zsh. Finally, we will pimp up the terminal, installing some cool themes and plug-ins. With Zsh and its plug-ins installed you become a Windows terminal productivity ninja.  So buckle up... it's going to be one hell of a ride

Installing WSL

The step to install WSL2 are:

  • Have docker desktop for Windows installed
  • Have SVN enabled in your BIOS settings
  • Within 'turn windows feature on and off' ensure:
  • Windows Hyper-vision Platform is enabled
  • Windows Subsystem for Linux is enabled

With WSL2 installed you can install your Linux distro. open up the Windows Store and search for:

  • Ubuntu
  • Windows Terminal

If everything goes OK then you should be able to open a terminal within the new Windows Terminal program and you should have an option to open a bash Ubuntu terminal!

InstallZ, Zsh and Oh My Zsh

You can install both Z and Oh My Zsh from your new bash shell. Type in these two commands:

Configuring Oh My Zsh

Oh My Zsh can be configured via its settings file, called .zshrc. First, we will change the theme. By default the theme will be set to 'robbyrussle' you can update it like this:

Find the line that says Theme=robbyrussell. Change this to use a different theme. Two themes that I recommend are agnoster and powerlevel9k.

Next, let us install some plug-ins. Within .zshrc find this line:

It is from this line you can install new plug-ins. For example, to install zsh-syntax-highlighting you can cone this repo from the command prompt:

Update your plug-in like this:

Another really cool plug-in is z. 'z' will install with oh my .zsh but it will not be enabled by default. To enable it by default, add it to your plugins line

If you want to be a legend.. and yes this is the easiest way that someone will consider you a legend today, then hit the subscribe button and click the like button. I really do appreciate all your support and motivation. If you have any comments I'll be happy to answer them. Happy coding!

References & Resources