Choosing a Shell - Fish, Zsh, and Bash Compared
A shell is the “translator” that sends text commands entered in the terminal to the operating system. It sits between the terminal window and the OS kernel, interprets commands, and returns the results.
There are several shells, and each has different strengths. This page explains the differences between Fish, Zsh, and Bash, which are widely used in 2026, and how to choose the right one for your situation.
The Relationship Between CLI and Shell
Section titled “The Relationship Between CLI and Shell”- CLI (Command Line Interface): the terminal screen itself, where you operate the computer with text
- Shell: the translator program that sends commands entered in the CLI to the OS
You can switch shells even within the same terminal app.
Comparing Fish, Zsh, and Bash
Section titled “Comparing Fish, Zsh, and Bash”| Shell | Pros | Cons |
|---|---|---|
| Bash | Highly compatible and stable. Built into almost every server and CI environment | Auto-completion and syntax highlighting must be configured manually |
| Zsh | POSIX-compatible and highly customizable with oh-my-zsh | Too many plugins can slow startup |
| Fish | Built-in autosuggestions and syntax highlighting. Comfortable right away | Not POSIX-compliant, so some Bash scripts may not be compatible |
Notes:
- Bash is widely used by default in Linux, WSL, and CI environments.
- Zsh is the default shell on macOS Catalina and later.
- Fish uses its own syntax, but it offers one of the best interactive experiences.
Default Shells in 2026
Section titled “Default Shells in 2026”- Zsh is the default shell for new users on macOS Catalina and later
- Older Bash still works, but Zsh is recommended for interactive work
Windows 11
Section titled “Windows 11”- Windows Terminal is included as the standard terminal host
- The initial prompt is PowerShell
- On WSL (Windows Subsystem for Linux), each Linux distribution defaults to Bash
Recommended Shell by Skill Level
Section titled “Recommended Shell by Skill Level”Beginner
Section titled “Beginner”Start by getting used to your operating system’s default shell.
- macOS -> Zsh, using the default setup
- Windows -> PowerShell or Bash in WSL
Once you are comfortable with the default shell, it is worth trying Fish. Its completion and suggestion features can help you learn faster.
Intermediate
Section titled “Intermediate”Customize Zsh to improve the experience.
- Install the
oh-my-zshframework - Add
zsh-autosuggestionsfor history-based suggestions - Add
zsh-syntax-highlightingfor syntax highlighting
Advanced
Section titled “Advanced”Use different shells depending on the task.
- Interactive work -> Fish
- Script development and CI -> Bash / Zsh
Recommended Shell by Development Style
Section titled “Recommended Shell by Development Style”| Development Style | Recommended Shell | Reason |
|---|---|---|
| Solo development | Fish or Zsh | Choose based on preference. Fish prioritizes comfort, while Zsh prioritizes compatibility |
| Team development | Bash or Zsh | Easier to standardize across members, and common settings can be managed in the repository |
| Organization / CI | Bash (sh) | Matches the standard environment used by servers, Docker, and CI |
Integration with VS Code
Section titled “Integration with VS Code”You can choose which shell VS Code uses in the integrated terminal.
- Open VS Code settings (
Cmd + ,on macOS orCtrl + ,on Windows) - Type
terminal integrated defaultin the search box - Or edit
settings.jsondirectly:
{
"terminal.integrated.defaultProfile.osx": "zsh"
}For Windows:
{
"terminal.integrated.defaultProfile.windows": "PowerShell"
}Notes and Best Practices
Section titled “Notes and Best Practices”Shebang settings
The first line of a script, called the shebang, should match the shell you want to use.
#!/usr/bin/env bash # For Bash scripts
#!/usr/bin/env zsh # For Zsh scripts
#!/usr/bin/env fish # For Fish scriptsPlugin management
If you add too many plugins to Zsh, the terminal can start slowly. Consider removing plugins you do not use often.
Managing config files with Git
It is a good idea to manage shell configuration files with Git in a dotfiles repository.
- Zsh:
~/.zshrc - Bash:
~/.bashrcor~/.bash_profile - Fish:
~/.config/fish/config.fish
Summary
Section titled “Summary”- macOS defaults to Zsh, and Windows defaults to PowerShell
- Beginners should first get used to the default shell
- Intermediate users can customize Zsh with oh-my-zsh
- Advanced users should choose based on the task: interactive use or scripting
- For scripts and CI, prefer Bash compatibility
Frequently Asked Questions
Section titled “Frequently Asked Questions”Q: Can Fish fail to run shell scripts I find on the internet?
A: Yes. Because Fish is not POSIX-compliant, Bash-oriented scripts (.sh files or scripts that start with #!/bin/bash) will not run directly in Fish. In that case, run them explicitly with Bash, for example bash script.sh, or switch to Bash for the command.
Q: Should I install oh-my-zsh?
A: It makes it easy to manage plugins and themes, but it is not required. First get used to plain Zsh, then install it only if you need it. Keeping the number of plugins small helps startup speed stay stable.
Q: Does changing shells erase my old settings?
A: No. Changing shells does not delete the configuration files on disk. However, each shell reads a different config file, so you need to add your settings to the new shell’s config file.