BYU Home page BRIGHAM YOUNG UNIVERSITY  
Search BYU 
.cshrc File FAQ
Table of Contents
Go Down to Content

Where is my .cshrc file located?
Your .cshrc file is a hidden file (because it begins with a ".") and is found in your home directory. Once logged in, you can access it through the path:

~username/.cshrc

where "username" is your CAEDM username.

What is my .cshrc file used for?
There are two files which execute when you log in to your account. These are the .cshrc and .login files. They contain information about how your account is set up. Your .cshrc file is executed every time you log in (or open a new terminal window) and is usually used to control your UNIX environment. It is also used to store aliases, which are like DOS batch files or Pro/E mapkeys.

How can I modify my .cshrc file?
Any UNIX text editor will do, such as Pico, NEdit, Emacs, or Vi. To open your .cshrc file in Vi, for example, type: vi ~/.cshrc

When do changes to my .cshrc file take effect?
Changes to the .login and .cshrc files will not take effect until you log out and log back in. Alternatively, when you make changes to the .cshrc file, you can make these changes take effect by typing

source ~/.cshrc

or

source ~/.login

which cause the computer to read and execute the indicated file. If you have more than one session open, this command will only affect the session in which it is entered. All subsequently opened windows will be affected by these changes.

How can I change my unix prompt?
There is a line in the .cshrc file which says:

set prompt="`hostname`% "

which is what gives you a unix prompt that shows the computer name, the character '%', and a space. You, however, may want a prompt which says "Don't worry, be happy", tells you the current working directory, and has a ":-)" at the end. You can do that by editing the 'set prompt=' line, changing it to something like this:

set prompt= "Don't worry, be happy %. :-) "

The special sequence "%." prints out the current working directory, whatever that happens to be at the time. Note that any changes to the .cshrc file will not go into effect until the next time you log in unless you can force them to take effect by typing:

source ~/.cshrc

Which .cshrc file is used by default?
When started, the TC shell executes the .cshrc found in the user's home directory. This can be used to set variables and to define aliases. A sample .cshrc is available here for download. If you would like to use it, download it to your home directory and rename it to ".cshrc"

Where can I go to learn more about Unix TC Shell?
For more detail, check out this online article: Making friends with C-shell and TC-shell. For a full reference, read the tcsh man pages by typing man tcsh in an xterm or by browsing the online version. You can also visit the TCSH home page.

What if I don't like TC Shell and want to use BASH?
You can select your preferred shell in the CAEDM Account Manager.

Maintained by The ECEn Web Team. Based on v. 3.8 of the ECEn web templates (view XML, live XML, see other formats).
Copyright © 1994-2005. Brigham Young University. All Rights Reserved.