Bash vs. Z Shell
When using Unix, you have two basic choices. You may not know you had this choice if you already use Terminal (as we went through last Saturday), but your basic choices are between one shell call Z Shell and another called Bash. (This is an oversimplification because there are in fact many more than this but these are the two most popular.)
Z Shell, also known a Zsh, was invented by Paul Falstad in 1990. Like most choices in the world of Unix, people who use Zsh really like it for good reason. It has great features: spell checking, fancy path expansions, and a whole lot more.
Bash was released around the same time by someone else named Brian Fox in 1989. Bash is the default on macOS. It is the one that most people know. It doesn’t have as many shiny features, but it has features of its own. For example, if you’ve ever in your shell navigation to a directory, type a few first letters and press tab. Your shell beeps at you, indicating that there’s more than one option to complete the file path. Then press tab again and your shell shows you a list of options that would match your file path. This is known as double-tab. (Covered last week in this post.)
Bash is by far the more popular because it is the default, but die-hard Unix users and ‘power user’ programmers tend to prefer Zsh.
In 2020, the tables turned when Apple made Zsh the default in Mac OS Big Sur.
- The File System, The Working Directory, and pwd
- cd (Change Directory)
- ls (List)
- Set the default EDITOR for you Shell
- man (Manual Page)
- ps (Process List)
- which (Show if and where a command lives in your path)
- kill and kill -9 (Stop and Terminate)
- Ctl-Z (Background a Unix process)
- Ctl-C (Stop a unix process)
- fg (Foreground)
- curl (Call URLs over HTTP, FTP, etc)
- Tab (Auto-complete)
- Tab-tab (Auto-suggest)
- Readline Shortcuts Cheatsheet
- Ruby Manager: RVM, rbenv, or Asdf
- Node Manager: NVM, nenv, or asdf
- Get NVM To Switch Between Node Versions when switching Directories (Zsh)