How to install zsh shell on Ubuntu

Running zsh Shell on Ubuntu
Running zsh Shell on Ubuntu

You can check if zsh shell is installed on your Ubuntu system by typing zsh on your bash shell if you get the below error you need to install it using apt install command,

$ zsh

Command 'zsh' not found, but can be installed with:

apt install zsh
$ apt install zsh
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
Suggested packages:
The following NEW packages will be installed:
  zsh zsh-common
0 upgraded, 2 newly installed, 0 to remove and 151 not upgraded.
Need to get 4450 kB of archives.
After this operation, 18.0 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 focal/main amd64 zsh-common all 5.8-3ubuntu1 [3744 kB]
Get:2 focal/main amd64 zsh amd64 5.8-3ubuntu1 [707 kB]
Fetched 4450 kB in 10s (449 kB/s)
Selecting previously unselected package zsh-common.
(Reading database ... 47953 files and directories currently installed.)
Preparing to unpack .../zsh-common_5.8-3ubuntu1_all.deb ...
Unpacking zsh-common (5.8-3ubuntu1) ...
Selecting previously unselected package zsh.
Preparing to unpack .../zsh_5.8-3ubuntu1_amd64.deb ...
Unpacking zsh (5.8-3ubuntu1) ...
Setting up zsh-common (5.8-3ubuntu1) ...
Setting up zsh (5.8-3ubuntu1) ...
Processing triggers for man-db (2.9.1-1) ...

Now if you type zsh you should be able to get into it,

$ zsh
LAPTOP-4AHAAKU# print hello zsh world
hello zsh world
Try Out Code2care Dev Tools:


Android Java Linux Microsoft Google Python macOS Notepad++ Microsoft Teams CSS PHP SharePoint Html Linux C Programs Bootstrap jQuery Sublime Android Studio Facebook Eclipse WhatsApp News MySQL Json HowTos JavaScript FTP S3


Code2care is an initiative to publish and share varied knowledge in programming and technical areas gathered during day-to-day learnings and development activities.

Students and Software Developers can leverage this portal to find solutions to their various queries without re-inventing the wheel by referring to our easy to understand posts. Technical posts might include Learnings, Tutorials, Trouble-Shooting steps, Video Tutorials, Code Snippets, How Tos, Blogs, Articles, etc.
🎉 We are celebrating the 10th years of Code2care! Thank you for all your support! We hope we made a difference.
We strong support Gender Equality & Diversity.

We stand in solidarity with Ukraine - Make a donation to UNHCR -