2. The Login Shell

When you log into your HPC Cluster, a terminal window opens with a command-line interpreter or login shell running. The figure below shows a terminal window after logging into the Illinois Campus Cluster. A shell is a computer program that provides a user interface for typing commands to interact with the underlying operating system. In Unix or Unix-like systems, the shell is used to enter single text commands line-by-line or multiple commands via a file called a shell script. Essentially, the shell translates the commands you enter into a form the computer can understand.

terminal window running a login shell

Figure: A terminal window running a login shell program on the Illinois Campus Cluster.

Several shell programs are available, each providing similar functionality but different syntax and capabilities. Most fall within one of two classes: those descended from the Bourne shell (sh) and those from the C Shell (csh). The Bourne shell is the original shell program developed for the Unix operating system. The C shell was created as an alternative to the Bourne shell to provide a syntax similar to the C programming language. The table below gives examples of some of their commonly used descendant shells.

Shell Class Description

Bourne-again shell (bash)

sh

An open-source extension of the Bourne shell with added features. It is the default shell for Linux.

Korn shell (ksh)

sh

An extension of the Bourne shell with several features adapted from the C shell.

TC shell (tcsh)

csh

A revision of the C shell with substantially expanded capabilities.


An HPC cluster will have several shells installed, with one of them set as the default. In most cases, the default shell will be bash. In the next section, you will learn how to tell which shell you have.