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.
Infos
- Bash: http://www.gnu.org/software/bash/
- Zsh: http://www.zsh.org
- Fish: https://fishshell.com
- Oh My Zsh: https://ohmyz.sh/
- Bash POSIX mode: http://www.gnu.org/software/bash/manual/bash.html#Bash-POSIX-Mode
- Fish in a Browser: https://rootnroll.com/d/fish-shell/
- Bash manual: http://www.gnu.org/software/bash/manual/
- Advanced Bash Scripting Guide: http://tldp.org/LDP/abs/html/
- Zsh documentation: http://zsh.sourceforge.net/Doc/
- Fish documentation: https://fishshell.com/docs/current/index.html
« Previous 1 2 3 4 5
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
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.
News
-
New KDE Slimbook Plasma Available for Preorder
Powered by an AMD Ryzen CPU, the latest KDE Slimbook laptop is powerful enough for local AI tasks.
-
Rhino Linux Announces Latest "Quick Update"
If you prefer your Linux distribution to be of the rolling type, Rhino Linux delivers a beautiful and reliable experience.
-
Plasma Desktop Will Soon Ask for Donations
The next iteration of Plasma has reached the soft feature freeze for the 6.2 version and includes a feature that could be divisive.
-
Linux Market Share Hits New High
For the first time, the Linux market share has reached a new high for desktops, and the trend looks like it will continue.
-
LibreOffice 24.8 Delivers New Features
LibreOffice is often considered the de facto standard office suite for the Linux operating system.
-
Deepin 23 Offers Wayland Support and New AI Tool
Deepin has been considered one of the most beautiful desktop operating systems for a long time and the arrival of version 23 has bolstered that reputation.
-
CachyOS Adds Support for System76's COSMIC Desktop
The August 2024 release of CachyOS includes support for the COSMIC desktop as well as some important bits for video.
-
Linux Foundation Adopts OMI to Foster Ethical LLMs
The Open Model Initiative hopes to create community LLMs that rival proprietary models but avoid restrictive licensing that limits usage.
-
Ubuntu 24.10 to Include the Latest Linux Kernel
Ubuntu users have grown accustomed to their favorite distribution shipping with a kernel that's not quite as up-to-date as other distros but that changes with 24.10.
-
Plasma Desktop 6.1.4 Release Includes Improvements and Bug Fixes
The latest release from the KDE team improves the KWin window and composite managers and plenty of fixes.