How to Install Z Shell (Zsh) and Oh My Zsh on Linux

Z shell is an environment friendly, highly effective and interactive Unix shell. It is easy to put in, configure, use, and be taught on any Linux platform, together with Ubuntu, Fedora, Arch Linux, and extra.

That is how one can set up Z shell and Oh My Zsh in your Linux machine.

What’s Z Shell and Oh My Zsh?

Z shell, or just Zsh, is an interactive login shell and scripting language interpreter. Many helpful options that you just discover in Bash, TCSH, and ksh have been integrated into Zsh together with many new options.

Oh My Zsh is a tremendous group pushed open supply framework that helps you handle Zsh settings. It comes filled with so many helpful options, helpers, plugins, themes, and different utilities that provide customers the very best shell expertise on the market.

Though Zsh is sort of much like Bash, the benefit of utilizing Zsh lies in the truth that it’s far more customizable than Bash.

Tips on how to set up Zsh on Linux

To get began, launch the terminal by urgent Ctrl+Alt+T on the keyboard It’s a good follow to replace and replace your Linux system earlier than putting in a brand new software in your machine. This resolves any damaged or outdated packages in your system which may create an issue when putting in a brand new app.

Now that the system packages are updated, you may set up Zsh. Listed here are the instructions to put in Zsh on a few of the main Linux distributions:

For Ubuntu, run:

sudo apt set up zsh

To put in Zsh on Fedora, run:

sudo dnf set up zsh

On Arch Linux, run:

sudo pacman -S zsh

The set up course of may also cowl fundamental settings which you can all the time reconfigure later.

Confirm Zsh Set up

One strategy to confirm the set up is to examine the model of Zsh you simply put in. Run the next command to examine the model:


Within the terminal, you will notice the model quantity after coming into the command. If the terminal doesn’t present the model quantity, it signifies that there was an issue with the set up.

By default, Zsh is put in on the /usr/bin listing. To verify the situation the place you put in Zsh, run:

whereis zsh

The output will present the trail to Zsh within the terminal.

Tips on how to Set up Oh-My-Zsh on Linux

Powerline is a strong plugin for Vim that gives standing strains and prompts for numerous different purposes together with Zsh, Bash, Qtile, IPython, tmux, and Superior. It gives helpful enhancements to Zsh. To put in it on Ubuntu and Debian, run:

sudo apt set up git-core curl fonts-powerline

On Fedora:

sudo dnf set up powerline-fonts

To put in Powerline fonts on Arch Linux:

sudo pacman -S powerline-fonts

Step 1: Set up Oh My Zsh on Linux

As soon as the Powerline fonts are put in, it is time to lastly set up the oh-my-zsh package deal. There are two methods to put in it: utilizing curl and wget.

To put in Oh My Zsh utilizing curl, run:

sh -c "$(curl -fsSL 

As a substitute, if you wish to use wget to put in Oh My Zsh, use this:

wget --no-check-certificate http:

Through the set up course of, the installer will ask you in order for you Zsh to be the default shell or not. To make Zsh the default shell in your system, kind Sure and hit Get into on the keyboard. You may change the default shell later with chsh in order for you.

After getting put in Oh My Zsh in your system, you will notice the next affirmation message within the terminal verifying that the set up was profitable:

ubuntu terminal showing ohmyzsh has been installed
Set up Oh My Zsh on Linux

To uninstall oh-my-zsh out of your system, run:


Configuring Oh My Zsh on Linux

Let’s undergo some fundamental settings it is advisable to perceive to be able to customise Oh My Zsh the best way you need.

1. Activate plugins utilizing Zsh configuration file

To see what plugins can be found, open the Oh My Zsh Plugins page on GitHub.

Right here you’ll find an inventory of all plugins you should utilize in Oh My Zsh. As soon as you’ve got determined which plugin you wish to use, open the Zsh configuration file utilizing nano:

nano ~/.zshrc
open zsh file with nano editor on ubuntu
Activate plugins utilizing Zsh configuration file

Within the file, discover the equipment () operate. Contained in the parentheses, add the title of the plugin you wish to activate. For instance, if you wish to allow “git”, add it like so:


Save and exit the file by urgent Ctrl+X after Y on the keyboard

To replace the modifications, run:

supply ~/.zshrc

2. Set Oh My Zsh Theme

You can see all of the songs of Oh My Zsh within the ~/.oh-my-zsh/themes listing. To see all accessible themes, go to the Oh My Zsh topic page on GitHub.

You may as well preview these themes in your browser. As soon as you’ve got selected the theme, open the Zsh configuration file like this:

sudo nano ~/.zshrc

Go to the road that claims ZSH_THEME=””. Right here, enter the theme you wish to maintain. For instance, if you wish to change the theme to “agnoster”, enter the title of the theme like this:

changing the theme to agnoster in the z-shell configuration file
Set Oh My Zsh Theme

You may as well set this feature to “random” if you wish to swap between totally different themes repeatedly.


What should you do not wish to use all themes, however solely particular ones? Fortuitously, you even have the choice of maintaining a set of themes. Discover the road that claims ZSH_THEME_RANDOM_CANDIDATES=() and enter the theme names like this:

ZSH_THEME_RANDOM_CANDIDATES=("agnoster" "grml" "robbyrussell")

Reload the file for the modifications to take impact:

supply ~/.zshrc

3. Configure Computerized Updates

Oh My Zsh is mechanically up to date each two weeks. You may disable this setting within the Zsh config file like this:


You may as well set the variety of days you need Zsh to examine for updates like this:


Z Shell gives options you will not discover wherever else

Z shell comes with so many options which might be laborious to seek out in different shells. It comes with a built-in spell checker and lets you spotlight code. It comes with many superb themes which you can apply to the shell. You may as well configure the shell to show essential system info.

With tons of options prepared that can assist you, now you can begin writing Bash scripts and applications extra effectively to automate duties and save a variety of time. Blissful script!

Be the first to comment

Leave a Reply

Your email address will not be published.