Categories: Ubuntu

How to Install and Configure Z shell (Zsh) on Ubuntu 22.04

Z shell or Zsh is a powerful and interactive command line shell that allows users to use it to execute commands on the system. It has a built-in autocorrection feature, syntax highlighting, spell correction and much more. Another significant advantage of Z Shell is that it has an extensive plugin system that allows users to customize the command shell on their own.

Follow this article’s guidelines to install Zsh on Ubuntu 22.04.

Install and Configure Z shell (Zsh) on Ubuntu 22.04

To install Zsh on the Ubuntu system, follow the below-given steps:

Step 1: Update Ubuntu Repository

Ensure the Ubuntu repository is updated and if not, the user can run the following command:

sudo apt update && sudo apt upgrade

Step 2: Install Zsh on Ubuntu

Now install Zsh on Ubuntu through apt package manager from the following command:

sudo apt install zsh -y

Step 3: Install Zsh Configuration Tool

For configuring the Zsh on Ubuntu system, you must need Zsh configuration tool, which can be installed from the following command:

sh -c $(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)

Add “Y” to allow changes the default shell to Zsh.

Step 4: Confirm Zsh Installation

To ensure Z shel is successfully installed on the Ubuntu system, enter the following command:

zsh –version

Test Zsh on Ubuntu

To test whether Z shell (Zsh) is running on the Ubuntu system, run the following update command.

The above command ensures that Zsh is successfully installed on Ubuntu system.

Now whenever, you want to use Zsh on Ubuntu, just type in “zsh” on the terminal to open the bash prompt.

zsh

Change Theme on Z shell (Zsh)

You can change the theme on Zsh by opening the configuration file using the following command:

Then replace the default theme name “robbyrussel” with “agnoster” already there inside the file.

Save the file using the “CTRL+X”, add “Y” and enter to exit.

After the reboot, open the Ubuntu terminal again to see the new changes.

Remove Z shell (Zsh) from Ubuntu

To remove Z shell or Zsh from Ubuntu, you can apply the following command:

sudo apt autoremove zsh -y

Conclusion

Z shell (Zsh) is an interactive command line shell that can be installed easily from apt package manager. However, the users must install Zsh configuration tool from the script file as this will allow users to configure the shell according to their choice. After the installation, you can use the change theme inside the file and use Zsh as your default Ubuntu terminal.

Ubuntu Server Admin

Recent Posts

Meet the wildlife conservation AI 5G hotspot at MWC Barcelona 2026

From March 2-5 in Barcelona, Canonical will present a working wildlife conservation platform that combines…

5 hours ago

Canonical and Ubuntu RISC-V: a 2025 retro and looking forward to 2026

2025: From RISC-V enablement to real execution  2025 was the year that RISC-V readiness gave…

1 day ago

Unmasking the Resolute Raccoon

You’ve almost certainly seen them… In the forest, rummaging through a dumpster, in poorly aging…

1 day ago

Bad Voltage Season 1 Episode 43: Got The Om On

Jono Bacon, Stuart Langridge and myself present Bad Voltage, in which Bryan is sadly unavoidably…

3 days ago

2011 LinuxQuestions.org Members Choice Award Winners – Thoughts

The polls are closed and the official results are in. You can view the detailed…

3 days ago

Building quantum-safe telecom infrastructure for 5G and beyond

coRAN Labs and Canonical at MWC Barcelona 2026 At MWC Barcelona 2026, coRAN Labs and…

4 days ago