Shells and Text Editors

Help Center > Introduction to Unix > Shells and Text Editors

Shells

A shell is the defining program of your Unix experience: it is what you see when you log in, and it acts as your command interpreter, passing what you type on to the system to be carried out. There are several different shells out there, each with different strengths and weaknesses.

To change your shell, use the chsh command. Just make sure that prior to doing so, you're sure you want to change to a particular shell. There are nightmarish stories of people having changed to some crazy shell and never being able to run commands again.

  • psh - Padded Shell, the default shell for the UA clusters.
  • bash - Bourne Again Shell, the free version of the Bourne shell distributed with most Linux systems. Bash is similar to the original Bourne shell, but has added features such as command line editing and tab completion. Bash is notorious for the difficulty some people have with it, but is considered the best shell for developing scripts.
  • csh - C shell, created at the University of California at Berkeley as an alternative to the Bourne shell. This shell was invented for programmers who prefer a syntax similar to that of the C programming language. It was once considered buggy, but the C shell has had a number of different versions developed to overcome the flaws in the original program. Generally, only experienced users like using the C shell.
  • tcsh - Tenex C Shell, a popular offshoot of the C shell family, is an extended version of csh. Some of tcsh's added features include enhanced history substitution, spelling correction, and tab completion.

Text Editors

The unfortunate truth is that while Unix is a great operating system that can be used as your primary and/or only OS, most people at the University of Washington don't really use it for more than a little text editing, usually for their Web pages. To run any of these text editors, type their name (followed by a file name, if you so desire) at the command line.

  • pico - Pine Composer. If you've used Pine, you've used Pico. Pico is a very simple and easy-to-use text editor that offers paragraph justification, cut/paste, and a spell checker. Pico is installed by default on just about any Unix system, including all the UA machines. Best of all, when you're using Pico, all commands that you can run are listed at the bottom of the screen (a very helpful program compared to most Unix ones).
  • vi and vim - Visual Editor and VI Improved. Vi and Vim have simple but powerful interfaces that make them highly useful for programmers entering or manipulating language statements. They allow you to add, change, delete, and otherwise manipulate text in all sorts of glorious ways. Vim and vi are not installed on Dante and Homer, but do show up on Mead, Goodall, Vergil, and other UA clusters. The main thing to remember about Vi/Vim for now is, if you somehow start them up without wanting them, and get stuck, type the following to quit (just don't ask why) : :q!
  • emacs - Editing Macros. Emacs provides typed commands and special key combinations that let you add, delete, insert, and otherwise manipulate text. Emacs offers a number of convenient capabilities such as the ability to initiate a program compiler and to handle e-mail from within the editor. Unlike Vi/Vim, Emacs is installed on Dante and Homer. The full capabilities of Emacs require a considerable investment to learn, however, so for now, remember this : to exit Emacs, type the following : <Ctrl>X C (for more information on Emacs, see Popular X Window Programs).
last modified on 01/29/2008 12:03