We compare the Bash, Zsh, and fish shells

Knowledge Warehouse

Bash provide developers a comprehensive reference on their website, but it is quite technical and dry [7]. A better introduction is provided by tutorials like the still-valid Advanced Bash Scripting Guide [8].

For Zsh users, the official documentation is the first place to go [9]. The fish developers offer a detailed tutorial, as well as a reference on their website [10].

Conclusions

Bash, fish, and Zsh offer a similar range of functions, but they differ in many details. These dissimilarities are especially present in the syntax of the control structures, which means that only extremely simple scripts run without changes in a different shell.

If you want to use a script on as many systems as possible, there is no alternative to Bash. It is normally preinstalled and has the biggest user base. If you have problems or questions, you can usually find help quickly on the Internet.

As for interactive command-line operations, many users express a preference for Zsh or fish because of their advanced autocompletion, enhanced configuration options, and other user-friendly features.

If portability does not play a role or is just a minor concern, the best approach is to try all three shells and use the one that works best for you. For example, if you only launch programs from the command line, fish's automatic suggestions could save you quite a bit of typing.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Command Line: Fish

    The fish shell provides many features that rival the well-known Bash. We examine some highlights.

  • Fish Shell

    The Fish shell offers some user-friendly features for command line beginners.

  • Bash Builtins

    Even beginners can benefit from a greater understanding of the Bash shell’s many builtin commands.

  • Command Line

    A few basic tricks can liven up the command line and add a dash of color to your console.

  • Bash vs. Vista PowerShell

    Microsoft’s new PowerShell relies on .NET framework libraries and thus has access to a treasure trove of functions and objects. How does PowerShell measure up to traditional shells like Bash?

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News