Good, you’ve decided to start using Oh My Zsh. You’ll quickly find yourself navigating the command-line with breeze, but enough chit chat. Let’s get to work.
If you’re using Windows, make sure to install the bash shell first. See our guide to installing UNIX Shell on Windows before continuing.
First you want to make sure zsh is installed on your computer. In your command-line, run
This should display something like
If not, you need to install zsh by running
sudo apt install zsh
Now it’s just a simple matter of installing Oh My Zsh. This can be done in two ways, either with Wget or Curl. Use the method above to check if you have a version of either one installed. Now you’re ready for installation.
Install via Curl:
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
or install via Wget:
sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
Great! Now it’s as simple as typing zsh in the command-line to run the shell. Before we let you go wild, it might be a good idea to look at some of the cool features that comes with Oh My Zsh. Please visit their Github page for more information.
Until next time, keep coding.
So you want the benefits of running the command-line interface on a UNIX based system, but won’t switch to Linux or macOS? Luckily there’s a solution. It used to be that you had to install a UNIX-like environment like Cygwin. UNIX-like meaning it simulated a UNIX CLI (Command-Line Interface), but was restrained to only work within Cygwins’ own sub-directories. This not only meant that all your code had to be inside a Cygwin directory, but more importantly, no zsh shell.
Fret not, those days are over. Now you can choose to get a Windows subsystem for Linux. As of February 2018, this is a completely new feature so be sure to tell your friends, family and colleagues. They might not have heard of it. Now, lets get to work.
- Open PowerShell as administrator:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
- Restart the computer when prompted.
For this next part, you need to make sure you’re running Windows build 16215 on newer.
- Go to Settings > System > About and look for OS Build:
For earlier versions follow these instructions using lxrun.
- Open the Microsoft Store and choose your favorite Linux distribution. We went for Ubuntu.
- Once the download has completed, select “Launch”.
This will open a console window. Wait for installation to complete then you will be prompted to create your LINUX user account.
Congratulations, you’re good to go! You can even run bash and zsh shells in your Windows Command Prompt, but don’t expect it to look as nice as on Linux and macOS. Remember to install Oh My Zsh, it looks way better. Installation guide can be found here.
If you at any point had trouble during this guide, visit the Microsoft guide.
Until next time, keep coding.