next up previous
Next: About this document Up: USING UNIX Previous: Pipes and Redirects (|

Startup Files (.login, .cshrc, .mailrc, etc.)

There are a number of files that control how various aspects of UNIX will work for you. You can put commands into these files and thereby ``customize'' your environment. The filenames of these files often start with a dot. These type of files have various names like, ``dot rc" files, startup files, etc. Files that begin with a dot are not listed with the standard ls command, so they are sometimes also called ``hidden'' files. You can get a listing of all these files using ls -a

The .login file is read when you login. It controls the messages you get initially, sets the terminal type, etc. The .logout is analogous but is read at logout.

Most of the things you will probably want to do involve putting things into your .cshrc file. Commands in the .cshrc file are executed every time you start a C shell. If you want to have various aliases available whenever you are logged in, you put the alias commands in your .cshrc files.

The .mailrc file controls how your mailreader works. The most common use for this file is for mail aliases. These have the form:
alias mike michalm@math.princeton.edu
alias msgdyn msgs, bradley@adx.adelphi.edu, pkoch@ccmail
After you put these in your .mailrc file and then start your mail tool, you can send mail to mike and it will go to michalm@math.princeton.edu. The next example of msgdyn shows how you can include several people in an alias. Their addresses should be separated by commas and they should be on a single line. These aliases will work with any mail system you use from your account, eg. regular mail, emacs mail, Xmail, dtmail, OpenWindows mailtool, etc.

Window systems also have startup files, as do programs like Maple and Mathematica. You need to look at the manuals for each program to learn how to work with these files.


next up previous
Next: About this document Up: USING UNIX Previous: Pipes and Redirects (|