Check out event 1 documentation, for installation guide for WSL.
NOTE:- One of the most popular alternative to oh my zsh!
is fishshell, but the installation for fishshell is a bit complicated.
Why don’t you open your WSL. Well it looks like a plain old terminal right? Now we will help you customize it.
zsh
short for zshell is a command line interpreter used by Linux or in this case your WSL.
Oh My Zsh helps you customize your zsh configuration/layout.
How? (you may ask).
By providing you with solutions like:
oh my zsh!
is completely open source so you can trust it and access their source code on their Github page.oh my zsh!
has a active community which introduce new updates and plugins.Type the following in your terminal and hit enter to install oh my zsh!
:
sh -c "$(wget https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"
(You can check you oh my zsh!
Github to know more about themes.)
The configuration for oh my zsh!
can be edited by editing the .zshrc by opening it any text editors like notepad, VSCode, sublime text, VIM etc.
The address of the file is ~/.zshrc
. That is, it is present in ~
or /home/<your_username>
directory.
You must keep in mind that when ever oh my zsh!
starts it always runs .zshrc
file.
Every-time you start your wsl you might observe that it opens in a specific directory always. In order to edit that you can tell oh my zsh!
to open wsl every-time it in any other directory.
Since the .zshrc file is read every-time oh my zsh!
starts, you can add the command in that file to change the directory so that it automatically opens wsl in that directory.
To do that add the following command
cd path/to/the/directory
to the .zshrc file( in any line)(recommended method). Or you can run the following command
echo "cd path/to/the/directory" >> ~/.zshrc
To add your theme, check out their Github page, select a theme and add it in your .zshrc file(at around line 11). Remove the default theme and add yours. It should look something like
ZSH_THEME=( "<theme_name_with_qoutes>" )
You can check out the pre-installed plugins on the Github page of oh my zsh!
. You can activate those by editing the .zshrc file and following the instructions from line 69 of the .zshrc file.
(You can add other plugins also but the instructions for those are not mentioned in this article.)
The line should look like
plugins=(git macos) //This is for the "git" and "macos" plugins.
You can add as many plugins as you want. But remember, plugins make you efficient but too many plugins can slow down the terminal.
You can disable auto updates for oh my zsh!
by uncommenting the 27th line on the .zshrc file.
It should like
zstyle ':omz:update' mode disabled
oh my zsh!
You can exit oh my zsh!
and go back to the normal bash terminal window using the command bash
and to enter oh my zsh!
again you can enter exit
in bash.