Skip to content
X

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.

  • 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.

ShellProsCons
BashHighly compatible and stable. Built into almost every server and CI environmentAuto-completion and syntax highlighting must be configured manually
ZshPOSIX-compatible and highly customizable with oh-my-zshToo many plugins can slow startup
FishBuilt-in autosuggestions and syntax highlighting. Comfortable right awayNot 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.
  • 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 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

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.

Customize Zsh to improve the experience.

  • Install the oh-my-zsh framework
  • Add zsh-autosuggestions for history-based suggestions
  • Add zsh-syntax-highlighting for syntax highlighting

Use different shells depending on the task.

  • Interactive work -> Fish
  • Script development and CI -> Bash / Zsh
Development StyleRecommended ShellReason
Solo developmentFish or ZshChoose based on preference. Fish prioritizes comfort, while Zsh prioritizes compatibility
Team developmentBash or ZshEasier to standardize across members, and common settings can be managed in the repository
Organization / CIBash (sh)Matches the standard environment used by servers, Docker, and CI

You can choose which shell VS Code uses in the integrated terminal.

  1. Open VS Code settings (Cmd + , on macOS or Ctrl + , on Windows)
  2. Type terminal integrated default in the search box
  3. Or edit settings.json directly:
{
  "terminal.integrated.defaultProfile.osx": "zsh"
}

For Windows:

{
  "terminal.integrated.defaultProfile.windows": "PowerShell"
}

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 scripts

Plugin 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: ~/.bashrc or ~/.bash_profile
  • Fish: ~/.config/fish/config.fish
  • 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

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.