This blog is NOT OFFICIAL website of Kali Linux. We just share Tutorials to learn Cybersecurity.

Bash vs ZSH in Kali Linux

With the Kali Linux 2020.3 update Kali Linux developers announced that ZSH will be the default shell from the update 2020.4. In this detailed article we clear some points on this matter. This is a smart move by Kali Linux developers. Even Apple has moved to ZSH as the default environment for macOS.
Bash or ZSH what should we use in Kali Linux

What is Bash?

GNU Bash or simply Bash stands for Bourne Again shell. This is a Unix shell and command line language written by Brain Fox in 1989. It becomes the most popular shell for Unix-like operating system users.
Kali Linux has bash as it's early days as a default shell. BackTrack Linux, from where Kali Linux was built, also uses bash as default. We are Kali Linux users so we don't need to talk much about Bash. We are already very familiar with Bash and have been using it for years.

What is ZSH?

ZSH stands for Z Shell (pronounced as Zee Shell). Paul Falstad wrote the first version of ZSH in 1990. Then it got upgraded a lot.
ZSH is the upgraded version of Bash with more cool stuff.
Some notable features of ZSH are:
  1. No need cd command: We just need to type the directory.
  2. Plugin support: ZSH supports various plugins.
  3. Theme support: ZSH supports themes.
  4. Spell Corrections: Z shell automatically corrects spells.
  5. Color customization: Here we can customize colors in shell.
For an example if we don't need to type cd /usr/local/bin to go to the directory, we also can do it by just using /usr/local/bin . Using plugins and themes are the best feature of ZSH.

ZSH and Kali Linux

ZSH pre-installed comes with Kali Linux 2020.3 update. But not as default shell. If we have installed Kali Linux 2020.3 then we got the default Bash shell as default. But we can use ZSH by simply using zsh command in our Bash terminal. Kali Linux next version Kali Linux 2020.4 will roll out with ZSH as default.
If we want to make it default now then we need to use change shell in our terminal the command will be following:
chsh -s /bin/zsh
For those who updated Kali Linux from an older version they might need to install zsh, zsh-syntax-highlighting and zsh-autosuggestions manually by using following command:
sudo apt install -y zsh zsh-syntax-highlighting zsh-autosuggestions
Also need to copy the configuration file by using following command:
cp /etc/skel/.zshrc ~/
Someone may ask why only ZSH and why not Oh My Zsh. Because Oh My Zsh comes with themes and plugins that can be more cooler than a normal ZSH shell.
The reason is Kali Linux is a lightweight distribution, using Oh My Zsh may affect it when we use Kali on a low resources device like Raspberry Pi Zero.

End of the Bash Era?

This is the common question that comes to many Kali Linux users' mind. The answer is simple "NO". Some people prefer Bash more than ZSH. Because they are handy with it. They are very familiar and happy with the Bash.
Bash will be there. If we need to use it we can change our shell and make Bash default again by using following command:
chsh -s /bin/bash

What about us?

We are happy with this. Bash is cool. But ZSH is cooler than Bash. ZSH is the smarter version of Bash. The commands on our tutorials will be based on Bash but we will use ZSH. Some can use ZSH or some can use Bash depending on the user's choice. Bash commands will run on ZSH. Like cd /usr/local/bin will navigate us in the directory in ZSH. But usr/local/bin command in Bash can't do that. To make things simple for our readers we give the commands in Bash.
Every Bash command is able to run on ZSH but all ZSH commands can't be in Bash. So for everyone our tutorial will follow Bash. But for our personal uses we are going to use ZSH. It's really cool.
For anything comment down in the comment section. Don't forget to follow us on Medium and Twitter. We always reply.