This tutorial will guide you through steps to Install Zsh on Linux and Configure it to suit your needs.

Definition of shell from Wikipedia:
A Unix shell is a command-line interpreter or shell that provides a traditional user interface for the Unix operating system and for Unix-like systems. Users direct the operation of the computer by entering commands as a text for a command line interpreter to execute or by creating text scripts of one or more such commands.
Most fresh installation of Linux comes pre-loaded with a Bash shell. Personally, I like zsh, and it’s my favorite shell that I use all the time.

Why Zsh?

Zsh does a bunch of other useful things that bash alone won’t accomplish.
Apart from being a powerful scripting language, Zsh is a shell designed for interactive use. It incorporates into it many useful features of Bash, ksh, and tcsh. Other additional features provided by zsh are:

  1. Auto Completions are case insensitive much faster than bash.
  2. All sorts of bells and whistles made possible by a community-driven framework like oh-my-zsh.
  3. Support multi-line editing
  4. Recursive file globbing
  5. Highly compatible with ksh.
  6. Zsh has a huge collection of better themes.
  7. Simple configuration style
  8. Output redirection to multiple destinations

And many more, do some googling to learn more. Here you’ll Install Zsh on Linux.

 Install Zsh on Linux

How to install Zsh on Arch Linux and Manjaro

sudo pacman -S zsh

How to install Zsh on Gentoo

emerge --ask zsh

How to install Zsh on Ubuntu and Debian based systems.

sudo apt-get install zsh

How to install Zsh on Fedora 23

sudo dnf install zsh

How to install Zsh on Fedora 22 and below

yum install zsh

How to install Zsh on CentOS and RHEL

yum install zsh

Check and Change shell to Zsh

Confirm it’s installed and see a list of installed shells. After you successfully Install Zsh on Linux, you should see version displayed.

zsh --version 
chsh -l

After you’ve installed it, we need to make it our default shell and customize it to get extra eye-candy. We’ll change the shell for both root and standard user account.
Non-root account,

usermod username -s /usr/bin/zsh


chsh -s /usr/bin/zsh username

Root account:

su -


chsh /usr/bin/zsh
Install Zsh on Linux


Install Oh My Zsh

The easiest way to customize zsh is to install Oh My Zsh to set zsh theme. Oh My Zsh is an open source, a community-driven framework for managing your zsh configuration. It comes with a load of plugins and themes to take advantage of. Install it as below.

  1. Wget
  2. curl
  3. git

Make sure you have all above prerequisites installed on your system.

sh -c "$(wget -O -)"

Once installed, you’ll get a bundle of themes that comes with it, located at ~/.oh-my-zsh/themes/

ls -l ~/.oh-my-zsh/themes/

Install Zsh on Linux

You can also take a look in the plugins directory to see all plugins available.

ls -lh ~/.oh-my-zsh/plugins

Install Zsh on Linux

Install Oh My Zsh themes for Zsh

We’ll install my favorite theme to ~/.oh-my-zsh/themes/ and configure .zshrc to use it.

cd ~/.oh-my-zsh/themes/
git clone
cp honukai-iterm-zsh/honukai.zsh-theme ~/.oh-my-zsh/themes/

Modify theme variable name to ZSH_THEME=”honukai” in ~/.zshrc

nano ~/.zshrc

See screenshot below,

Install Zsh on Linux

Save changes and exit. Type CTRL+X, Then Y.
Source ~/.zshrc file

source ~/.zshrc

Configure Help command.

nano ~/.zshrc

Add the following lines to the end.

autoload -U run-help
autoload run-help-git
autoload run-help-svn
autoload run-help-svk
alias help=run-help

Source it and you’re good to go.

source ~/.zshrc

Fish-like syntax highlighting (Optional)

cd ~/.oh-my-zsh/plugins 
git clone 
nano ~/.zshrc

Add below the line at the end,

source ~/.oh-my-zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh

Then source zshrc file

source ~/.zshrc

Persistent rehash: This allows compinit to automatically find new executables in the $PATH.

nano ~/.zshrc

Add line:

zstyle ':completion:*' rehash true

Install Zsh on Linux

Save and exit, the source it.

source ~/.zshrc

Configure additional zsh-completions, applicable to all Linux systems.
I will assume you already installed oh-my-zsh, if not refer to it above.

git clone ~/.oh-my-zsh/custom/plugins/zsh-completions

Then enable it in your .zshrc

nano ~/.zshrc


autoload -U compinit && compinit

Install Zsh on Linux

zsh tab-completion system

To enable the famous zsh tab-completion system, you need to add above commands ( autoload -U compinit && compinit).
If you are running Arch Linux, you can install it using Pacman package manager. This has an advantage of getting updates for it automatically.

pacman -S zsh-completions

Installing  zsh-completions on Gentoo

emerge --ask zsh-completions

Install zsh-completions on Fedora / CentOS / RHEL / Scientific Linux:

cd /etc/yum.repos.d/
yum install zsh-completions

When you use Pacman and emerge, it will enable it automatically on zshrc file.
To uninstall oh-my-zsh type

rm -rf ~/.oh-my-zsh

Also, check How to configure Zsh syntax highlighting on Linux / macOS


We’ve covered how to Install Zsh on Linux and configuring Zsh environment on your system. Zsh is the most customizable shell I have ever used. It’s easy to install and customize with more than 100 themes. There are plenty of plugins to extend its functionality with frameworks like oh-my-zsh.

Your support is our everlasting motivation,
that cup of coffee is what keeps us going!

As we continue to grow, we would wish to reach and impact more people who visit and take advantage of the guides we have on our blog. This is a big task for us and we are so far extremely grateful for the kind people who have shown amazing support for our work over the time we have been online.

Thank You for your support as we work to give you the best of guides and articles. Click below to buy us a coffee.


Please enter your comment!
Please enter your name here