These classnotes are depreciated. As of 2005, I no longer teach the classes. Notes will remain online for legacy purposes

UNIX01/UNIX Shells

Classnotes | UNIX01 | RecentChanges | Preferences

Under UNIX, your CLI is provided by something that is called a "shell". A shell is a program that provides the basic interface and functionality necessary for user interaction, and usually also provides at least basic scripting capabilities.

There are several shells available. This means that you can generally find one that fits your needs. I will not cover all of the shells in this class, but here are some of the more common and/or interesting ones of the bunch:

BASH is probably the most common shell in use today. It is the default shell you will be using in most Linux distributions as well as many comercial UNIXes.

BASH stems from the original UNIX shell, 'sh', and incorporates many features of other popular shells (thus making it quite useful).

The name is an acronym for the `Bourne-Again SHell', a pun on Stephen Bourne, the author of the direct ancestor of the orginal Unix shell.

TCSH is an enhanced, but completely compatible version of the Berkeley UNIX C shell (csh). It is a command language interpreter usable both as an interactive login shell and a shell script command processor. It includes a command-line editor, programmable word completion, spelling correction, a history mechanism, job control and a C-like syntax.

TCSH is the second-most widely used shell today, and it's ancestor, csh, used to be the most commonly used shell. If you are working with an older or even ancestral UNIX system (such as Solaris, BSD, etc) you will likely have TCSH or csh as your default shell.

KSH, or the Kornshell, is a superset of the original Unix sh created by David Korn at Bell Telephone Laboratories.

It has the same functionality as the original sh, but provides many other features. Many other modern shells (such as BASH) incorporate a great deal of the original KSH features.

ZSH is the "Z-Shell". It is a shell designed for interactive use, although it is also a powerful scripting language. Many of the useful features of bash, ksh, and tcsh were incorporated into zsh; many original features were added.

ZSH is not widely used, as far as I can tell, but it does have a strong group of supporters that keep it alive and very well. I, personally, would not recommend it to novices, as it can be the most heady and complicated of the various shells.

JSHELL is only worth mentionning here because it is a shell written entirely in Java. Thus, it can run on Windows, some PDAs, and even some cell-phones in addition to UNIX and Linux. Otherwise, it is very similar in syntax to sh.


While there are many different shells available for Linux and UNIX, we will only be focusing on BASH during this course and future courses. I will leave it up to you to explore the others and determine which one(s) you prefer.

I highly recommend the following book that covers several of the key UNIX/Linux? shells as well as how to write scripts for them:



Classnotes | UNIX01 | RecentChanges | Preferences
This page is read-only | View other revisions
Last edited August 24, 2003 5:01 pm (diff)
Search:
(C) Copyright 2003 Samuel Hart
Creative Commons License
This work is licensed under a Creative Commons License.