zsh5 command not found on Ubuntu 21.04 server

zsh5 command not found on Ubuntu 21.04 server

 

root@ubuntu-21.04:/# zsh5 –help
bash: zsh5: command not found

Error shows zsh5 command not found on your Ubuntu server. zsh5 command is provided by zsh package and this package might not be installed on your server. Run the command ‘dpkg -l | grep zsh’ to check whether zsh package is installed.

Follow the below steps to install zsh

1. Log into your Ubuntu 21.04 server via SSH

2. Run ‘apt update’ to update the package information

3. Install zsh package using apt command

4. Enter ‘Y’ if apt ask for confirmation while installing zsh

5. To verify the installation, run zsh5 –help command
 

root@ubuntu-21:/# apt update

root@ubuntu-21:/# apt install zsh
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following additional packages will be installed:
libc-bin libc6 libcap2 libgdbm6 zsh-common
Suggested packages:
manpages glibc-doc locales gdbm-l10n zsh-doc
The following NEW packages will be installed:
libcap2 libgdbm6 zsh zsh-common
The following packages will be upgraded:
libc-bin libc6
2 upgraded, 4 newly installed, 0 to remove and 84 not upgraded.
Need to get 7839 kB of archives.
After this operation, 18.4 MB of additional disk space will be used.
Do you want to continue? [Y/n]

 

How to install zsh Z shell on Ubuntu 21.04 server

How to install zsh Z shell on Ubuntu 21.04 server


 

How to download and install zsh deb package

1. Log into Ubuntu 21.04 server via SSH

2. Download zsh package from Ubuntu website using wget command

3. Install zsh package using dpkg or apt command
 

cd /usr/local/src/

http://archive.ubuntu.com/ubuntu/pool/main/z/zsh/zsh_5.8-6_amd64.deb

apt install ./zsh_5.8-6_amd64.deb

 
Run the command ‘zsh5 –help’ to see the command usage and version.

zsh5 –help

Run the command zsh5 –version to see the version.

# zsh5 –version
zsh 5.8 (x86_64-ubuntu-linux-gnu)