Shells

A shell is a program that executes the commands you type at a system prompt. The basic shell you use in Unix is one of only several possible shells. I recommend you use tcsh; it gives you lots of helpful things other shells may not provide.

To find out which shell you are using, type echo $SHELL at the prompt.

To switch to tcsh, type tcsh at the prompt. To change your shell permanently, type which tcsh at the prompt. This will give you a path. Then, type chsh at the prompt. It will ask you for the path of the new shell; type in the path that which gave you. Logout and log in again, and you should find yourself using tcsh.

What does tcsh give you?

  • history - list the history of commands you have given at the prompt. Then you can use....
  • !no - executes the command numbered no from the history list.
  • !letters - executes the most recently executed command starting with letters.
  • tab completion - Say you have a directory my-C++-files. Typing cd my- and then pushing the tab key will cause the system to complete the directory name for you. This can save quite a bit of typing if you have long directory or file names.