Category: CommunityAlternative Shells For Linux

Share this post...Tweet about this on TwitterShare on Google+0Share on Facebook0
Alternative Shells for Linux

Photo Credits: blakespot

Most system administrators who work with Linux know that the command line shell is the best way to quickly get work done and to write scripts that tie together the many command line tools that make Unix-derived operating systems so flexible and powerful.

By far the most popular shell is Bash, which is the default in many distributions. Developed under the aegis of the Free Software Foundation as a replacement for the Bourne shell, the Bourne-again shell is the command line interface that most Linux users are familiar with. There are, however, many alternatives that users might want to try out. Some of them extend the capabilities of Bash in some way, and all of them were developed to scratch some itch that the developer had. It’s definitely worth being aware of the options and how to try them out, so we’re going to have a look at 5 of the most popular alternative shells for Linux.

We’re limiting this article to alternative shells, so we’re not going to be looking at tools like BusyBox, which aims to be a comprehensive command line environment, including versions of most of the tools that usually run on top of a shell.

Changing Shells

Unless you’re running a Debian derivative, you’ll almost certainly be using Bash by default. Most of the alternatives we’re going to suggest can be easily installed using your distribution’s package manager, but we’ll also provide links to the project pages in case you want to grab the tarball and compile yourself.

Once installed, the simplest way to test out a new shell is to simply run it from the command line like any other program. That’s only temporary; once you close the shell you’ll revert back to the default when you open another command line.

Many distributions offer a GUI tool for configuring user accounts, and it may be possible to use that to switch shells. It’s also possible, although perhaps not advisable, to directly edit the shell listed in the passwd file.

The best way to change the default shell for your environment permanently is to use the ‘chsh’ tool. For example, if you want to change your shell to zsh, you’d run the command:

chsh -s /bin/zsh

The Alternatives

Dash

If you’re running a Debian version later than Squeeze, or one of its derivatives, including Ubuntu, then you’re likely already using Dash, as it’s the default for those distributions.

Dash is the Debian Almquist shell and was developed as a replacement for the original Bourne shell. The differences between Bash and Dash aren’t particularly exciting as Dash was designed to be largely compatible (although not entirely). Bash is more feature-rich, but Dash is much smaller and faster. If you have need of a quick and light shell replacement, give Dash a spin.

Zsh

The Z shell is the slightly younger brother of Bash, and incorporates many of the features of Bash and tcsh, but implements some features that make interactive use a lot more pleasant.

One of the major reasons to give zsh a go is its context based tab completion , which is much more comprehensive than Bash’s default file-based completion. Zsh can tab complete for almost everything you might want, including options and arguments. For example, if you’re using the command ‘chmod’, zsh will complete with usernames, or if you’re using the package manager, zsh can tab complete with package names. It’s great for reducing typos and speeding up command creation.

Zsh is also capable of sharing command history between multiple running shells, which is a boon if you like to have lots of command line windows open at the same time.

Fish

Fish, the friendly interactive shell, was designed to make the command line more user friendly. It incorporates handy features like syntax highlighting, and particularly neat is its ability to suggest auto-completions as you type, with much of the same tab completion capabilities that zsh has.

Csh

Csh (The C Shell), and its improved descendant tcsh, were created by Bill Joy, the original developer of the vi editor. The goal was to improve on some of the interactive features of the Bourne shell and to make the command line a scripting syntax more in line with the C programming language.

There are very many alternate shells out there, created for all sorts of reasons. We’ve only listed a few here, so if you want to give your favorite a shout out in the comments, feel free.

LinuxSysAdmin Tools
Apr 12, 2013, 10:28 amBy: InterWorx (3) Comments
  1. Sweep Nine: https://bashfailed.wordpress.com/ points out reasons to consider alternative shells.
    June 15, 2017 at 5:00 am
    Reply
  2. Sweep Nine: Here are some reason to consider bash alternatives: https://bashfailed.wordpress.com/
    June 15, 2017 at 4:50 am
    Reply
  3. Sebastian: think I will try out zsh or fish it sounds more user friendly than bash
    December 4, 2014 at 5:25 pm
    Reply

Leave a Reply
Surround code blocks with <pre>code</pre>

Your email address will not be published.

Newsletter

Sign up to receive periodic InterWorx news, updates and promos!

New Comments

Current Poll

  • This field is for validation purposes and should be left unchanged.

Forum Posts