Terminal
When did MacOS Switch to Zsh Terminal?
Catalina MacOS runs .zshrc
rather than .bash_profile
and .bashrc
by default when launching a terminal.
Zsh vs Bash Terminal on Macs
Bash
Bash (Bourne Again SHell) has been the default shell for most Linux distributions and Appleās MacOS until Catalina. It is a command processor that typically runs in a text window where the user types commands that cause actions. Bash can also read and execute commands from a file, called a script.
Key Features of Bash:
- Command line editing
- Unlimited size command history
- Job Control
- Shell Functions and Aliases
- Indexed arrays of unlimited size
- Integer arithmetic in any base from two to sixty-four
Zsh
Zsh (Z Shell) is a popular shell that combines features of Bash and other shells like tcsh and ksh. It is highly interactive and customizable. With MacOS Catalina and later, Zsh is the default shell.
Key Features of Zsh:
- Command line editing, history and completion
- Extended file globbing allows file specification without needing to run an external program such as find
- Loadable modules, providing among other things: full TCP and Unix domain socket controls, an FTP client, and extended math functions.
- Compatibility mode for Bash and other shells
- Themeable prompts, including the ability to put prompt information on the right side of the screen and have it auto-hide when typing a long command
- Shared command history among all running shells
Switching Between Bash and Zsh
You can switch your shell in the terminal using the chsh
command followed by -s
(specify shell) and the path to the shell executable. For example, to switch to Bash, you would use chsh -s /bin/bash
.
Please note that the steps may vary slightly depending on the version of macOS you are using.
Journal
- Created file