Skip to content

JA7. Linux shells

Problem Statement

Go through the top 5 open-source Linux shells in the following document, and list and explain one pro and one con for each:

https://linuxhint.com/top-5-open-source-shells-linux/

Solution

1. Bash

  • Bash is the default and most popular shell on most Linux distributions.
  • The name comes from Bourne Again SHell, which is a reference to the original Bourne shell.
  • Website: https://www.gnu.org/software/bash/
  • Pros:
    • It is the default shell on most Linux distributions.
    • It is very powerful and flexible.
    • It is very easy to use, fast, and stable.
    • Unlimited command history.
    • supports functions, aliases, and shell variables.
    • Works interactively or executed from a script.
    • It is POSIX compliant.
  • Cons:
    • Extra care is needed to avoid harmful effects: one space can change the command’s effect, especially when executing destructive operations like delete (LiquiSearch, n.d.).
    • Slow execution speed: since the shell creates a new process for each command (LiquiSearch, n.d.).

2. Zsh

  • Zsh is a shell designed for interactive use, although it is also a powerful scripting language.
  • The name derives from Zhong Shao, a teaching assistant at Princeton University and now Yale (Guckes, 2003).
  • Website: http://www.zsh.org/
  • Pros:
    • Supports command completion.
    • Supports spell correction.
    • Easy installation.
    • Command history sharing among running shells.
    • ZSH is the default shell on macOS (replace Bash).
    • Supports multi-line commands.
  • Cons:
    • Uses more resources than Bash to support its big feature set.

3. Ksh (Korn Shell)

  • KSH is Built on top of C shell and Bash by David Korn in the 1980s.
  • The name comes from the name of the author.
  • Website: http://www.kornshell.com/.
  • Pros:
    • C-like syntax.
    • More powerful data structures (arrays, associative arrays, etc.).
    • More powerful control structures (for, while, until, etc.).
    • Pause and resume a running script.
  • Cons:
    • Not as popular as Bash, which makes it harder to find help and documentation.

4. Tcsh (Tenex C Shell)

  • TCSH is a C shell developed by Bill Joy at Berkeley in the 1980s.
  • The T comes from Tenex, the name of the operating system that Joy was working on at the time. while CSH is the name of the original C shell forked from.
  • Website: https://www.tcsh.org/
  • Pros:
    • Backward compatible with C shell.
    • Powerful command history features.
    • Supports autocompletion, aliases, and wildcard matching.
  • Cons:
    • Not as popular as Bash, which makes it harder to find help and documentation.

5. Fish (Friendly Interactive Shell)

  • Fish was released in 2005 and offers an easy-to-use, user-friendly, open-source shell for Linux.
  • The name comes from Friendly Interactive Shell
  • Website: https://fishshell.com/
  • Pros:
    • Fish is a modern shell that is easy to use, and beginners friendly.
    • Fish is a smart shell that can be customized to your needs.
    • Syntax highlighting.
    • Supports autocompletion, aliases, wildcard matching, etc.
  • Cons:
    • Fish is not as popular as Bash, which makes it harder to find help and documentation.

Reference