8 C
Texas
angeloma
Senior Writer and partner

Let us talk about ZSH in Linux

In this post, we will learn what ZSH is, why you should think about using it, and how to install it in Linux.

Let’s start with the basics, what is Zsh?

ZSH is a powerful command interpreter for Unix-like operating systems, like BSD or GNU/Linux. Therefore we can install it in a lot of different devices including Linux distributions and so on. It was written by Paul Falstad when a student at Princeton, but since a few years ago here has seen an increase in the popularity of this shell. Many people have already made the switch from Bash to ZSH.

This change has been made progressively because Bash is the default shell on almost all Linux distributions. This means that if it works many people will not touch it.

Some of the main features of ZSH are the following:

  • Path expansion, so we will be able to access quickly to many paths.
  • Autocomplete folders with the cd command.
  • Improved array management.
  • Fully customizable.
  • Also, supports themes and add-ons.
- Advertisement -

So, ZSH is a more modern shell than Bash, even though they are used for the same command execution and work in the terminal.

Why should I use it?

The first thing to say is that ZSH is a very efficient shell. Both in resource management and productivity.

So this shell can be used by any user but it will certainly be better used by those who make intensive use of the terminal.

On the other hand, this shell supports themes that help to further customize the experience. Also, there is the possibility of adding plugins that extend the functionality of the shell and increase productivity. Some are almost indisputable, such as Git or Ansible.

In short, if you use the terminal a lot and want to increase your productivity and efficiency, ZSH is the one for you.

Install ZSH in Linux

As ZSH is a Linux veteran, it is available in almost all Linux distributions through the official repositories.

In the case of Debian, Ubuntu, ElementaryOS, Linux Mint, and derivatives such as MXLinux:

sudo apt install zsh

If you use Fedora, CentOS 8, and RHEL:

sudo dnf install zsh

For OpenSUSE:

sudo zypper in zsh

But if you use Arch Linux and derivatives:

sudo pacman -S zsh

It’s that easy.

Changing the default shell for the user

Once you install it you have to make the current user change the shell because in all those bash distributions it is the default.

To do this, we will use the command usermod that modifies the configuration parameters of the user.

sudo usermod --shell [shell_path] [user]

In my case, it would be as follows:

sudo usermod --shell /bin/zsh angelo

Then log out and log back in. And that is it.

Conclusion

To know about other shells is always good to increase our productivity. In this case, ZSH is one of the most popular and famous. Now you know about it and you know how to install it on your favorite Linux distribution.

So, share this post and join our Telegram Channel.

ZSH website

- Advertisement -
Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"

LEAVE A REPLY

Please enter your comment!
Please enter your name here



Latest article