home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


Unix Power ToolsUnix Power ToolsSearch this book

3.5. What Goes in Shell Setup Files?

Setup files for login shells ( Section 3.4) -- such as .login and .profile -- typically do at least the following:

In the C shell, the .cshrc file is used to establish settings that will apply to every instance of the C shell, not just login shells. For example, you typically want aliases (Section 28.2) available in every interactive shell you run -- but these aren't passed through the environment, so a setup file has to do the job. You may wish to put all of your aliases into another file, such as .aliases, or qualify the name with the shell's name, such as .csh.aliases, to allow for different alias formats between shells, and then you can use the source command to read in that file on startup from .cshrc.

Even novices can write simple setup files. The trick is to make these setup scripts really work for you. Here are some of the things you might want to try:

  • Creating a custom prompt.

  • Coordinating custom setup files on different machines (Section 3.18).

  • Making different terminal settings depending on which terminal you're using (Section 3.10 and others).

  • Seeing the message of the day only when it changes.

  • Doing all of the above without making your login take forever.

--TOR and SJC



Library Navigation Links

Copyright © 2003 O'Reilly & Associates. All rights reserved.