The Shell Startup Files

When you log in, the shell reads two startup files named .cshrc and .login from your home directory. If .tcshrc exists, tcsh reads .tcshrc instead of .cshrc. These files contain commands that set up your working environment — things like aliases, your terminal settings, your command-line prompt, and the set of directories your shell searches to find commands. You can edit the startup files to modify your environment; any changes take effect the next time you log in.

Become familiar with the contents of your startup files by running the following command in your home directory:

% more .cshrc .login

You might not understand everything you see, but the files will make more sense as you gain experience with the shell.

More information about the startup files, as well as guidelines for modifying the file, is provided in Chapter 4, The Shell Startup Files. Also, find .cshrc and .login in the index; this handbook presents many examples of startup file commands that you can use to customize your working environment.

Get Using csh & tcsh now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.