$title = "Managing your environment"; $area = "Unix Support"; $metadata = "unix, environment, .cshrc, .login, variable, shell, printenv, setenv, set"; $pfloc = ""; require '/usr/local/wwwdocs/ucs/fragments/header.phtml'; require '/usr/local/wwwdocs/ucs/fragments/header-bc.phtml'; ?>
Customising your Unix environment
Every new user of the ISS Unix systems is given a set of files that set up a standard operating environment across all ISS Unix systems (which are not necessarily identical in terms of machine architecture or the Unix variant used). The most important of these are .cshrc, .login and .logout. Two others are .profile (which relates to the use of Bourne shell only) and .dtprofile (which relates to the Sun workstations and is created the first time you log in to one). These files contain Unix commands, often those which set system variables.
At login the C shell first reads .cshrc followed by .login. Commands in .logout are executed automatically when you log out. Additionally, the commands in .cshrc (C SHell Run Commands) are executed each time a new C shell is started. Note that, if you are logged into a Sun workstation, it is possible that .dtprofile will be executed instead of .login (although this can be prevented).
The correct way to set up your own environment is to append new commands to these files - you must never completely replace their content; if you do it is likely that your environment will not work across all ISS systems.
As .login is read only once, its purpose is to set conditions which will apply to the whole session and to perform actions that are relevant only at login.
The following are guidelines as to where to put automatic customisation commands. Note that some application packages have customisation instructions which deviate from these - there may be good reasons for this.
.cshrc
All set commands except for set path (but note that it is recommended that you use setenv PATH set the path).
alias commands
A umask command
Commands that need to be executed for each shell invocation.
.login
setenv commands
Commands which need to be executed once per login. e.g. stty, mesg, limit.
Commands which generate output.
.login should not contain commands which are prerequisites for the correct functioning of any command in .cshrc.
require '/usr/local/wwwdocs/ucs/fragments/footer.phtml'; ?>