Enterprise Command Line Shells

In UNIX and Linux, a shell is the basic program used in the command line. Some believe the name is a metaphor for a snail—the shell wraps around the kernel. Like most things in the Linux world, there are many variations and versions, often building off each other and fixing some weakness of a previous shell. Popular examples of shells used on developer workstations include ZSH, FISH, PowerShell, and others.

Technically, the graphical desktop environments on Linux are shells too – GNOME and KDE being popular examples. These are rarely (if ever) used on servers.

In Enterprise Linux, only a few shells are in widespread use:

  1. BASH (Borne-Again Shell)
    • This is far and away the most commonly used shell in Enterprise Linux. All Linux distributions have BASH available, even if it is not the default. Not all UNIX distributions include BASH.
    • Standard file location: /bin/bash or (/usr/bin/bash).
    • #!/bin/bash is usually included at the beginning of each shell script so the kernel knows which interpreter to use.
    • The official source code for BASH can be found at https://git.savannah.gnu.org/cgit/bash.git/tree/, but the unofficial mirror is much more active: https://github.com/bminor/bash.
  2. KSH (Korn Shell)
    • Popular among the remaining UNIX distributions such as AIX.
    • Lacks many features that are standard in BASH, most notably tab-completion and “up-arrow” history
    • The official source code for KSH can be found at https://github.com/ksh93/ksh.
  3. SH (Shell)
    • The original shell interface that was used in UNIX
    • Still exists in modern Linux distributions
    • Standard file location: /bin/sh (or /usr/bin/sh)

Bonus: Core Utilities

Many basic commands run in any shell are owned/maintained by GNU and supported by the Free Software Foundation. Please check out this page, and clone the source code to your local machine with:

git clone git://git.sv.gnu.org/coreutils