Zsh Vs. Bash in macOS Catalina

With the launch macOS Catalina, besides the many novelties and features, Apple introduced and zsh (Z shell) in place Bash (Bourne-again shell). Users familiar with Bash scripts and interactive command lines from Terminal, they quickly noticed this change. In the Terminal running a command line is suggested to do it the transition from Bash to Zsh.

The default interactive shell is now zsh.
To update your account to use zsh, please run `chsh -s /bin/zsh`.
For more details, please visit https://support.apple.com/kb/HT208050.

Used since 16 years ago, since the time of OS X 10.2 Jaguar, Bash has been used as the main developer shell for scripts and command lines to the base of the system macOS.

Why the transition from Bash to Zsh was made

In simple terms, it would be about the restrictions imposed by distribution license (GNU) for the use of Bash.
Bash is in the process of development, reached the 5.0 version. Final version released at the beginning of January 2019. However, Apple used until MacOS Mojave (released in the fall of 2018) an outdated version. It was preferred Bash NOTHING, a version of 2007. Newer versions of Bash have been released under license GNU General Public License modified (GPLv3), which requires some restrictions and clauses for software providers.

Bash Vs. zsh

For users, the switch from Bash to Zsh should be a reason to rejoice. Especially for those who use frequently Terminal. zsh (Z shell) is based on the same language as Bash, but it brings interesting features. Intuitive command lines, PluginATVs and themes graphics.
Besides the Bash commands, in Zsh there are many other specific commands, and many can be configured by the user to perform some operations. Alias.

- automatic completion of command lines (auto-completion)
- extended variables
- replace path
- intuitive path extension. “/u/lo/b <TAB>” goes to "/ usr / local / bin"
- support oh-my-zsh for extended capabilities
- themes support in Terminal
- many others, presented here.

Oh-My-zsh is the most popular framework for Zsh, being delivered with many PluginATVs and themes included. Easy to install, configure and customize.

How to install Oh-My-Zsh for Zsh on macOS

Run in Terminal command line:

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

After installing oh-my-zsh you have a generous library plugins if themes. In addition, there are many configuration and customization options depending on your preferences. All the details find here.

Module and utility recommendations: iTerm2 (terminal emulator, what will it replace Terminal), Homebrew and theme POWERLEVEL9K for Zsh (Oh-My-Zsh).

How we change default shell in macOS Catalina

If you are not satisfied with zsh, you can always return to Bash in macOS Catherine. However, keep in mind that it is a rudimentary version of Bash, from 2007.

Run in Terminal command line to return to Bash:

chsh -s /bin/bash

Besides Bash and Zsh you can also activate other shells in macOS Katherine.
Run in Terminal command cat /etc/shells through which you can see the shells included in macOS Katherine.

/bin/bash
/bin/csh
/bin/dash
/bin/ksh
/bin/sh
/bin/tcsh
/bin/zsh

Passionate about technology, I enjoy writing on StealthSettings.com since 2006. I have a rich experience in operating systems: macOS, Windows, and Linux, as well as in programming languages and blogging platforms (WordPress) and for online stores (WooCommerce, Magento, PrestaShop).

How to » iHowTo » iHowTo - macOS » Zsh Vs. Bash in macOS Catalina
Leave a Comment