next up previous contents
Next: The Internet Up: Shells Previous: Scripts

Initialisation Files

Initialisation files are a special kind of file that is read when a program is started. When a user logs in, the operating system starts some default scripts, which set up the standard path, the user, the home directory and the system's default environment. Each user can have a special file usually called .profile in their home directory, which is run for them at login. In addition the shells also have special scripts that set up aliases and the like for users. For bash the initialisation file is called .bashrc, for csh it is .cshrc. If some alias or path change should be made permanent it should be entered into the shell's initialisation file. If a change is made to the shell's initialisation file it has to be reread by the shell. Simply executing the script will not have any effect as the shell will not inherit the child's (or script's) environment. We have to use the special sourcegif command:

$source ~/.bashrc


$



Mark O. Stitson
Wed Sep 25 10:45:32 BST 1996