6 Alternative Linux Shells for Power Users

Bash, or the Bourne Again Shell, is what comes pre-installed on most Linux distros. However, it’s not the only shell out there. There are several others to try. Here are six alternative shells that can replace bash. Each of them has its pros and cons, so you have to try them out and see which is the best for you.

The Bourne shell, named after its creator Stephen Bourne, was one of the first shells ever. You could say it was used as the basis on which Bash is created. Sometimes users confuse both and think they are the same while they are not. It’s true many .sh scripts will run on Bash, too, because Bash includes a lot from Sh, but the opposite isn’t true.

linux-shells-01-sh-shell

You can think of Sh as the predecessor of Bash. It doesn’t have that many features, but it’s more standardized than Bash.

Dash is essentially Bash on Debian systems. If you are running a Debian-based distro, chances are you are running Dash, not Bash. However, because of the complexities of using Dash as the default shell, Ubuntu (a Debian based distro) decided to use Bash for interactive scripts, not Dash as the default shell.

linux-shells-02-bash-vs-dash-990x495

Dash lacks many of the features of Bash, such as tab completion and command history, but it’s faster and much smaller in size (100K vs. 900K), which is a factor if you are running it on a not-so-powerful computer.

The C and C++ programming languages were quite popular, and large portions of Linux itself is written in them. This is why it’s not surprising that there is a shell – the C Shell or Csh – that uses the C syntax model. If you are fluent in C, this shell will be a natural to you.

linux-shells-03-c-shell

However, the Csh shell had quite a lot of bugs and not many features. This is why the Tcsh shell came to the scene. Tcsh fixed most of the bugs and added new features, such as command completion, job control, spelling correction, etc. Unfortunately, Tcsh and Bash are very different, which means you can’t run Bash scripts in Tcsh and vice versa.

Ksh, or the Korn shell (named after its creator David Korn), was introduced at about the same time as Tcsh, but unlike Tcsh, it’s compatible with Sh and Bash. It was an AT&T proprietary shell until 2000, and this is why it didn’t become that popular. Ksh adds more features to Sh, such as floating-point arithmetic, job control, command aliasing and command completion.

linux-shells-04-ksh-shell

The shells listed so far were created mostly in 1970. Computers have gone a long way since, and this demands new shells, too. One of the popular new shells is the Z shell, or Zsh. It was created by Paul Falstad in 1990.

linux-shells-05-zsh-shell

It has the features of Bash and some more, such as startup files, login/logout watching, and built-in programming features like bytecode, support for scientific notation in syntax, floating-point arithmetic, closing comments, concept, variable, functions, and key index. If you are looking for a more advanced shell, try the Z shell.

The quest for more modern shells didn’t end with Fish. The new century saw new shells, such as Fish (or Friendly Interactive Shell). It was released in 2005 and is not based on the Sh shell. Its most distinguishing aspect is that it has a unique command-line syntax that is designed to be more beginner-friendly. It also has some cool features, such as automatic suggestion, selection with the arrow keys, supported by X clipboard, 256 terminal colors, etc.

linux-shells-06-fish-shell

The main downside of Fish is that it’s very different from Bash and other Bourne-based shells. As a result, you can’t port code (and knowledge) from Fish to Bash and Sh.

So which shell is the best? Unfortunately, this question can’t be answered. All of them have their advantages and disadvantages, and it really depends on what you need it for. But now that you know the pros and cons of each of these six alternative shells, it will be easier for you to decide in which situation which shell you should use. Though after all, honestly speaking, this choice is largely a matter of personal preferences – I myself stick to Bash, and I am fine with it. Bash is the default shell for a reason you know!

8 comments

  1. Are you saying that Bash is not for power users or that one cannot be a power user while using Bash?

    Maybe the differences between the various shells you mention are esoteric and appreciated only by sysadmins and system programmers or maybe I’m just dense but I did not read anything that would convince me to switch from Bash. Basically what you said is that they all are more or less different from Bash and that each has its pluses and minuses but you never said what would make these shells better for power users.

    From what little I know of Linux internals, somehow I do not think that switching shells is as easy as you imply. It certainly is not like switching from Libre Office to KOffice or Kingsoft Office. Just uninstall one app and install the next one. Seems to me that changing from Bash to one of the other shells, especially tcsh or fish, would at least require the re-writing of all the scripts in the distro.

    • I am not saying Bash isn’t for power users or that you should switch just for the sake of it. After all, I myself stick with Bash and I am OK with it. I can’t say when one should switch shells or anything else – it’s up to you to decide. If you know C, then you might (or might not) be more comfortable with the C shell. If you are looking for a more beginner-friendly one, try Fish. If you are with Bash and you are OK with it, why switch? The idea of the article is to show there are other shells, too and one or more of them might be better for you.

  2. Dash is the default /bin/sh and Bash set for interactive use on both Ubuntu and Debian by default, not only on Ubuntu. It has always been that way!

  3. I wouldn’t say Fish is for power users (although it can serve them fine aswell). It’s more user friendly than others (like the name suggests) and thus suitable especially for non-power users. For example you don’t have to configure basically anything since the defaults are very well thought out and the syntax and help files are easy to understand. Only real downside for non-power users it’s that you can’t just copy-paste bash commands and expect them all to work.

  4. If it ain’t broke….don’t fix it. Bash is what I learned when I first came to Linux, I see no need to muddy the waters with all these others. Granted, for someone else Bash might not do it for them, and they might need more functionality, but for me? Bash is best. ‘Nuff said.

  5. A few differences are noted, but little is said about the advantages and disadvantages if the differences. The biggest difference seems to be whether they are compatible with Bash.

  6. Its always worth discussing alternatives for bash, specially if you consider occasional script-writers as
    important user group. The bash syntax is hard to memorized and the support for structured data is poor.
    https://bashfailed.wordpress.com/ gives motivation to push benign alternatives.

Comments are closed.

Sponsored Stories