How to setup Zsh in Fedora Linux?

In Unix-based operating systems, a shell is a program that interprets the command and acts as an intermediary between user and kernel. It is the command line interface of a Linux system. Bash, Ksh, and Zsh are some examples of Unix shells.

Each shell has unique features and capabilities but in the end, all of them are used for the same task. Like most Linux distributions Fedora also comes with bash as the default shell.

As I already discussed how to install Zsh on Ubuntu.

Today in this article, I will discuss how to install Zsh on Fedora Linux.

What is Zsh (Z Shell)?

Zsh is the short form of Z Shell it is a Unix shell that can be used as an interactive login shell and command-line interpreter. Zsh is an extended and improved version of bash It includes the features of other Unix shells.

Why Use Z Shell?

Zsh is a feature-rich Unix shell that supports third-party plugins which makes working faster on the Linux command line.

The key features of Zsh are given below-

  • Automatic directory change -All you have to type is the directory name and your current working directory will be changed to the directory that you have just typed
  • Recursive path expansion – For example  /u/lo/b expanded to /usr/local/bin
  • Spell check and approximate completion – Zsh is capable of correcting small spelling mistakes
  • Plugin and theme support – Zsh includes different plugin frameworks

How to Install Zsh on Fedora?

Zsh is available in the default Fedora repository you can directly install it by using the dnf command on your Fedora system.

First, use the given command to update the Fedora package repository –

sudo dnf update

Next, use the following command to install the Zsh on Fedora –

sudo dnf install zsh

Press y and then enter if it asks for your confirmation.

install zsh

How to use Zsh in Fedora?

Once the Zsh package gets installed on your system you can start using it by executing the given command –

zsh

This will display the initial configuration settings –

initial configuration settings

Press 1 to continue to the main menu.

zsh configuration main menu

Press 1 once again to configure the settings for history. Now press 1, 2, or 3 for configuration, and press 0 to save the settings.

history configuration settings

Similarly, you can do other configuration settings. After you are done configuring Zsh restart your shell to make the changes effective.

Make Zsh your default Shell

Your system may have multiple shells installed so to make Zsh your default shell first find the location where Zsh is installed.

Use the following command to find the location –

whereis zsh

zsh location

And then run the given command to make Zsh default shell on your Fedora system –

chsh -s /usr/bin/zsh

zsh

For more information, you can view the man page of Zsh by executing the given command-

man zsh

Oh My Zsh

Oh My Zsh is a user community website that collects the third-party plugins and themes for Z shell. You can visit their official website to explore new themes or plugins.

So you have set up Zsh successfully on your Fedora system. Now if you have a query or feedback then write us in the comments below.

Leave a Comment