Bash as a shell in operating systems and zsh as an alternative

The so-called shell is used on the computer as a communication channel between the user and the Unix-based operating system. This human-machine interface provides a usage environment and ensures that the computer and its software become usable. The simplest way of communication - for example under macOS on the Apple Mac - is this Port, sometimes also called command line or command line. Until macOS 10.14 Mojave became the Bash Shell used. Since macOS 10.15 Catalina comes the Z shell, in short zsh called, for use. Here you can find out more about it.

Bash has been used as the shell on Mac OS X, OS X, and macOS for years. However, zsh has been used in the Apple Mac terminal for a number of years. Here you can find the reasons why.
Bash has been used as the shell on Mac OS X, OS X, and macOS for years. However, zsh has been used in the Apple Mac terminal for a number of years. Here you can find the reasons why.

The importance of the shell in operating systems

The shell is a text-based user interface that allows commands to be sent directly to the operating system. In this way, users can manage their files, run programs, monitor and control processes, carry out network actions, start downloads, convert files, adjust settings and much more. An evolution of the original Unix shell, Bash has established itself as one of the most popular and widely used shells - it comes standard with many Unix and Linux distributions.

The switch from bash to zsh at Apple

The bash shell was developed in the late 1980s and version 1989 was released in 1. Version 5 (v5.2.15 from December 2022) is now available. However, with the release of macOS 10.15 Catalina in 2019, Apple already decided to replace Bash as the default shell with the Z Shell (zsh). This decision has mainly under  Developers attracted some attention because Bash - more precisely the Bash version 3 - since Mac OS X 10.3 Panthers was the preferred shell of macOS from 2003. The TENEX-C-Shell was used beforehand.

The terminal shows you which shell is used in your macOS version.
The terminal shows you which shell is used in your macOS version.

There were several reasons for switching to zsh with macOS Catalina. One of them was the licensing of Bash. The Bash shell has been licensed under the GNU General Public License (GPL) since version 4, which means that if the software is modified and redistributed, changes to the code must be published. However, macOS is a proprietary system and Apple does not intend to pass on the code. By switching to zsh, Apple was able to take advantage of this shell while avoiding licensing issues. The Z Shell or zsh offers quite a few advantages compared to Bash.

The zsh Shell: A powerful alternative to Bash

The zsh is an extensible and customizable shell that appeared in 1990. Version 5 (v5.9 from May 2022) is now available. Zsh is a combination and improvement of Bash as well as Kornshell (ksh) and the TENEX-C shell (tcsh). It offers many functions that are not available in Bash by default. Some of zsh's features are (excerpt):

  • Improved autocomplete: The zsh can display a programmable command line complement that suggests commands, filenames, and arguments as input is typed. This speeds up the typing process and reduces the chance of typos. A single spelling correction can also be used.
  • Themes and plugins: Themes and plugins are supported to customize the shell UI and add additional functionality. This makes it possible to adapt the shell according to your own preferences and for your individual workflow. However, commands for hundreds of programs are already included in the standard version.
  • Powerful scripting: The zsh shell provides a rich scripting environment with advanced control structures, array manipulation, and other features that make scripting easier.
  • Advanced history management: The zsh allows for finer command history management, including the ability to remove duplicates, search commands by keywords, and make other customizations.
  • Compatibility with other shells: Since zsh is not a separate and completely different shell from other shells, it can also use commands from other human-machine interfaces. It can also imitate other shells, e.g. B. as a Bourne shell with /bin/sh. 

My tips & tricks about technology & Apple

Did you like the article and did the instructions on the blog help you? Then I would be happy if you the blog via a Steady Membership would support.

2 comments on “Bash as a shell in operating systems and zsh as an alternative”

Post a comment

Your e-mail address will not be published. Required fields are marked with * marked

In the Sir Apfelot Blog you will find advice, instructions and reviews on Apple products such as the iPhone, iPad, Apple Watch, AirPods, iMac, Mac Pro, Mac Mini and Mac Studio.

Specials
Shopping
  •  
  •