zsh

An interactive shell close to bash in syntax, and the default login shell on macOS since Catalina (10.15).

In more detail

Everyday commands such as cd, ls and echo work the same in zsh as in bash, but zsh differs in details such as array indexes starting at 1 and unquoted variables not being word-split by default. It reads ~/.zprofile for login shells, which is where PATH changes usually go on a Mac, and its prompt usually ends in %. Scripts should still name bash in their shebang so they do not depend on whichever shell a user happens to log in with.

Related terms

Taught in

References