Richards Center at Yale University
RC Home | Search | Table of Contents | General Information

Last Modified: Friday, 25-Aug-2006 16:19:09 EDT

Setting Up your UNIX environment

Modifying your .cshrc.$USER file.

User environment initialization makes use of the files files .cshrc .tcshrc and .login . (See description of login process.)

All new user accounts created as of June 23, 1998 will be set up as follows:

The .cshrc file in each user's home directory will be a linked to /srv/local/bin/csb.csh . At the end of this file it will pass execution over to the file .cshrc."username" in your home directory which you are free to create and modify at will.

The .login file in your home directory will be linked to the file /srv/local/bin/csb.login which will execute .login."username" in your home directory.

If you remove these links and create your own .cshrc or .login files you will miss any changes the staff makes to the UNIX environment.

For current users the staff recommends the following:

  1. Move your .cshrc and/or .tcshrc file to a different named file.
  2. Create the link (ln -s /srv/local/bin/csb.csh ~/.cshrc).
  3. Create a new .cshrc."username" file and include in it those things that are truly necessary. (This is a good time to clean it up).

Do the same for your .login file.

Near the end of the /srv/local/bin/csb.csh file you will notice that it sources a script called /srv/local/bin/cleanpath.csh . This file takes your $PATH environmental variable and removes duplicate entries without rearranging the order. It is a good idea to source this near the end of your .cshrc."username" file to prevent multiple entries.

For new users feel free to use the /srv/local/bin/csb.csh file as a template for creating your own .cshrc."username" file. It breaks up the execution environment by machine type and login mode.

A list of favorite variable definitions is here. Please feel free to copy any you find helpful to your .cshrc."username" file.

A few last points


When you log into one of our systems the first thing run is the system wide initialization file (/etc/cshrc on the SGIs or /etc/csh.login on the Alphas). This file provides a minimal environment for you. The next file executed is your .tcshrc file if it exists or your .cshrc file. Last of all is your .login file.

Your .login file is executed one time only from the window you initially logon from. This file should contain things such as tset and stty commands which only need to be set at logon time. Your .tcshrc or .cshrc file is run every time your tcsh shell starts which includes each time you open a new window, issue shell escapes, run a shell script, and use rsh to run commands. Aliases should be put in this .cshrc file because they are not propagated from the parent shell.

There is substantial further customization which is unique to our installation which must be made common to all users.

Last Modified: Friday, 25-Aug-2006 16:19:09 EDT

RC Home | Search | Table of Contents | General Information
Richards Center ( at Yale University (
Contact: michael^strickler_at_yale^edu