The C shell is an interactive command interpreter and a command programming language. It uses syntax that is similar to the C programming language.
The csh command starts the C shell.
When you log in, the csh command first searches the system-wide setup file /etc/csh.cshrc. If the setup file exists, the C shell executes the commands stored in that file. Next, the C shell executes the system-wide setup file /etc/csh.login if it is available. Then, it searches your home directory for the .cshrc and .login files. If they exist, they contain any customized user information pertinent to running the C shell. All variables set in the /etc/csh.cshrc and /etc/csh.login files might be overridden by your .cshrc and .login files in your $HOME directory. Only the root user can modify the /etc/csh.cshrc and /etc/csh.login files.
The /etc/csh.login and $HOME/.login files are executed only once at login time. These files are generally used to hold environment variable definitions, commands that you want executed once at login, or commands that set up terminal characteristics.
The /etc/csh.cshrc and $HOME/.cshrc files are executed at login time and every time the csh command or a C shell script is invoked. They are generally used to define C shell characteristics, such as aliases and C shell variables (for example, history, noclobber, or ignoreeof). It is recommended that you only use the C shell built-in commands in the /etc/csh.cshrc and $HOME/.cshrc files because using other commands increases the startup time for shell scripts.