O'Reilly logo

Linux in a Nutshell, Fourth Edition by Aaron Weber, Stephen Figgins, Ellen Siever

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 8. tcsh: An Extended C Shell

This chapter describes tcsh, an enhanced version of the C shell. On many versions of Linux, tcsh is also used as the C shell; in that case, the tcsh features described in this chapter work even when you run csh. The C shell was so named because many of its programming constructs and symbols resemble those of the C programming language.

The default shell on Linux systems is bash. If you want to use tcsh, you first need to change your default. Each user’s shell preference is kept in the password table. If you are creating an account, you can set the default shell when you add the user. If the account already exists, use the chsh command to change the shell (see the command descriptions in Chapter 3).

Overview of Features

Features of tcsh include:

  • Input/output redirection

  • Wildcard characters (metacharacters) for filename abbreviation

  • Shell variables for customizing your environment

  • Integer arithmetic

  • Access to previous commands (command history)

  • Command-name abbreviation (aliasing)

  • A built-in command set for writing shell programs

  • Job control

  • Command-line editing and editor commands

  • Word completion (tab completion)

  • Spellchecking

  • Scheduled events, such as logout or terminal locking after a set idle period and delayed commands

  • Read-only variables

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required