Home > Wiki Tips

A Beginner's Guide: What Is ZSH?

Updated on Friday, June 14, 2024

iBoysoft author Vain Rowe

Written by

Vain Rowe
Professional tech editor

Approved by

Jessica Shee

English Français Deutsch やまと Español Português

Summary: This article from iBoysoft is for people who know nothing about ZSH, which elaborates on what is ZSH and how to install ZSH on Mac. Feel interested in it? Click in and start reading immediately!

what is ZSH

In the early times, the computer has no user interface and comes with an interactive program, so people need to communicate with it in a specific language, which is also known as commands. In other words, people type in related commands in the program and it will output designed results.

The platform interprets command lines to the interactive program called Shell, which can execute scripts and programs as well. Here in this article, you will know the most popular shell - zsh. Let's get started then.

What is zsh?

ZSH, also called Z shell, is an environment that can interpret shell scripts and an interactive login shell. ZSH is the default shell for macOS and Linux, and it is built as an extended version of Bourne Shell with a slew of improvements and features. Examples include plug-in support, better customization, theme support, and spelling correction.

While Bash, Bourne-Again Shell, is the default shell in most popular Linux distributions, like Ubuntu, Linux Mint, Solaris 11, Pop OS, and so on. It also offers support for Windows.

What are the differences between ZSH and Bash?

Since both bash and zsh are interpreters for command lines, you must wonder what's the differences between them. Do not hurry yet, keep reading and this post guides you to know the differences.

Zsh is the top version of bash with kinds of new features and enhancements.Bash is the default shell for Linux and a replacement for Bourne Shell.
Zsh reads .zshrc in an interactive shell and .zprofile in a login shell.Bash reads the .bashrc file in the non-login interactive shell and .bash_profile in login shells.
Zsh uses percentage escapes.Bash uses backslash escapes.
Zsh has a built-in wildcard expansion.Bash doesn't have an inline wildcard expansion.
Zsh supports customization with kinds of frameworks.Bash doesn't have customization options.
Zsh has plenty of plug-ins and themes.Bash doesn't have any themes or plug-in support.
Zsh has syntax highlighting and auto-correction features.Bash lacks syntax highlighting and auto-correction features.
In zsh binding is done using 'bindkey builtin'.In bash keybinding is done using '.inputrc' and 'bind builtin'.

In brief, zsh offers more flexibility and a better user experience than Bash. If you're interested in it, install zsh on your device directly.

How to install zsh on Mac?

If you plan to install zsh on your Mac, you first should check if you have Homebrew installed on your device. If not, you need to install Homebrew on your Mac beforehand.

With Homebrew installed, simply type in the command line in your Terminal window to download zsh:

brew install zsh

On-My-Zsh is the most highly praised and popular plugin framework for ZSH, which comes with various plugins and themes. So this article is going to teach you how to install it and use it on your device.

Step 1: Launch Terminal on your device and paste the following command line with the native clipboard manager for Mac.

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Step 2: Once receiving an error that says "git clone of oh-my-zsh repo failed", directly click the Install button on the new window.

How to install zsh on Mac

Step 3: When the process ends, paste the Oh My Zsh installation command into the Terminal window:

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

When the running process completes, you have installed the most well-criticized ZSH framework on your Mac successfully.

Now you can set it as your default Terminal on your device, just open Terminal and paste the command line in the Terminal window, and hit the Return/Enter key to run it.

chsh -s $(which zsh)

If you find this article informative, please click the Share button below to let more people know about it!



ZSH is worth a shot which functions wonderfully in interpreting command lines, scripts, and interactive shells. If it is to your liking, go ahead to install it on your macOS computers now!

Also read:

How to Add or Delete Zsh Alias on Mac? [With Examples]