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!

Leave a Reply

Yeah! You've decided to leave a comment. That's fantastic! Check out our comment policy here. Let's have a personal and meaningful conversation.