How to Install and Setup Zsh (Z Shell) in Fedora

Zsh (short for Z Shell) is a feature-rich and powerful shell program for Unix-like operating systems with lots of interactive features. It is an extended version of the Bourne Shell (sh), with a large number of new features, and support for plugins and themes. It is designed for interactive use and it is also a powerful scripting language.

One advantages of Zsh over most other Linux shell programs is that it is more sophisticated and configurable, yet super easy to customize. Some of its key features include auto-completion with the cd command, recursive path expansion and spelling correction and interactive selection of files and directories.

In this article, we will explain how to install and setup Zsh on a Fedora system.

Installing Zsh in Fedora System

Zsh can be found in the Fedora repositories and can be installed using the following dnf command.

$ sudo dnf install zsh

To start using it, simply run zsh and the new shell prompts you with an initial configuration function wizard for new users as shown in the screenshot below.

This wizard allows you to create zsh’s startup/initialization files. Press (1) to continue to the main menu.

$ zsh

Running Zsh in Fedora

Here is an image showing the main menu. Note that the status of all configurable options is Recommended. To pick an option for configuration, enter the key for the option.

Zsh Configuration Options

For example enter (1) to select configure settings for history. From the next screen, enter (0) to remember edit and return to the main menu (where the status of this option should change to Unsaved changes).

Select Zsh Configuration Options

Repeat the previous two steps for the other options. Now the first three options should indicate a status of Unsaved changes. Configuration option (4) allows you to pick some common shell option.

Zsh Shell Option

To save the new settings, enter (0). You will see the message shown in the following screen shot and your command prompt should change from $(for Bash) to %(for Zsh).

Zsh Command Prompt

Now that you have setup Zsh on your Fedora system, you can go on and test some of its key features, as we mentioned at the beginning of this article. These include auto-completion, spelling correction, and much more.

Making Zsh as Default Shell in Fedora

To make Zsh your default shell, so its executed whenever you start a session or open a terminal, issue the chsh command, which is used to change a user’s login shell as follows (you’ll be prompted to enter your account password).

If You Appreciate What We Do Here On TecMint, You Should Consider:

TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

Aaron Kili is a Linux and F.O.S.S enthusiast, an upcoming Linux SysAdmin, web developer, and currently a content creator for TecMint who loves working with computers and strongly believes in sharing knowledge.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.