This section describes the setup files - .cshrc, .login, - for the C-shell command interpreter (tcsh or csh). Each of these files contains commands and instructions to set up (or disable) various features that affect how the system responds to you.
The Setup Files in your Home Directory
Each new account has a default set of initialization files. These files have comments ( lines starting with #) defining what different commands do. You may wish to modify them according to your needs. Make sure to save a copy of the old files before changing anything. You can edit these files using any text editor.
Setting up your Terminal
As indicated in the section on Terminal Setup, the
command stty provides the user with a means to set up terminal characteristics
like setting the erase and kill keys to control keys such as
DEL and BACKSPACE.
stty -a displays a list of all terminal characteristics currently in effect.
In the C-shell the set command can be used to select the desired
options. For instance,
% set history = 100
Sets the shell to save the last 100 commands in the history buffer.
To turn off an option, the unset command can be used. Other shell variables such as prompt can also be similarly set up. Refer to the section on SHELL Commands.
To see what options are currently in effect in the C-shell, just type set with no arguments.
The .cshrc file can be used for setting up special variables called environment variables. Some of the shell variables such as path, user etc. get their values from the corresponding environment variable such as PATH, USER, etc.. Environment variables are passed along to subsequent commands and programs automatically.
To set an environment variable use setenv command. To see what environment variables are currently in effect use printenv command. To remove an environment variable use unsetenv command. See the section on Environment Variables for more information on environment variables.
When the user logs in, the default shell performs instructions in the .login file. Subsequent invokings of any shell ignore the .login file.