'csh startup scripts

I know that csh has a lot of start-up files (.login, .cshrc, etc.). The problem is that I'm starting a new csh terminal and I'm seeing a lot of non-standard (not the standard ones like $HOME, $SHELL, etc.) environment variables set at start-up that I didn't set in any of my start-up scripts. Is there a way to figure out the sequence of files that get sourced at start-up in my current session. If not, is there even a facility that tells which script sets some environment variable given the variable's name?



Solution 1:[1]

You need to check the system-wide start-up files. Start with:

/etc/profile

which calls: /etc/{the system-wide shell setup you are using} e.g. /etc/csh

Then your own profile is called

~/.profile

which in turn calls your personal shell setup, e.g. ~/.csh

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 fig