zsh: command not found – How to Install zsh shell on CentOS 7

zsh: command not found – How to Install zsh shell on CentOS 7 / RHEL 7 server

Follow the below steps to install zsh shell on CentOS 7 / RHEL 7 server.


-bash: zsh: command not found

/usr/bin/zsh: No such file or directory

Z shell is a powerful interactive shell on Linux servers, it is written in C. On CentOS and Redhat servers, zsh shell is provided by zsh package.

1. Log into your CentOS 7 / RHEL 7 Server via SSH as root user

2. Run rpm query all command to check whether zsh package is installed on not.

Command : #rpm -qa | grep zsh

root@server [/]# rpm -qa | grep zsh
root@server [/]#

zsh shell is not installed on the above CentOS server. Install zsh package using yum like shown below :

root@server [/]# yum install zsh

Resolving Dependencies
–> Running transaction check
—> Package zsh.x86_64 0:5.0.2-14.el7 will be installed
–> Finished Dependency Resolution

Dependencies Resolved

Package Arch Version Repository Size
zsh x86_64 5.0.2-14.el7 base 2.4 M

Transaction Summary
Install 1 Package

Total download size: 2.4 M
Installed size: 5.6 M
Is this ok [y/d/N]: y
Downloading packages:
zsh-5.0.2-14.el7.x86_64.rpm | 2.4 MB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : zsh-5.0.2-14.el7.x86_64 1/1
Verifying : zsh-5.0.2-14.el7.x86_64 1/1

zsh.x86_64 0:5.0.2-14.el7


Now Z shell installed on your Linux Server.
Install z shell zsh centos 7 server

How to download and install Z shell rpm on CentOS 7 / RHEL 7 server

1. Log into your Linux server as root user

2. Download zsh package from CentOS website using wget command

# wget http://mirror.centos.org/centos/7/updates/x86_64/Packages/zsh-5.0.2-34.el7_8.2.x86_64.rpm

3. You can install zsh rpm using yum command or rpm command

# yum install zsh-5.0.2-34.el7_8.2.x86_64.rpm

yum will install zsh and the required dependencies

# rpm -ivh zsh-5.0.2-34.el7_8.2.x86_64.rpm

You must install the required dependencies for zsh package, if you are installing using rpm command. The below dependencies are required :


Do not install the dependencies if it is already installed on your server.
Install zsh shell on centos 7 redhat 7