Configuration Files For Shells
Shells read configuration files on multiple circumstances which differ depending on the shell. These files usually contain commands for that particular shell and are executed when loaded. These files are usually used to set important variables like $PATH used to find executables, and others that control the behavior and appearance of the shell. This table shows the configuration files for popular shells:
sh | ksh | csh | tcsh | bash | zsh | |
---|---|---|---|---|---|---|
/etc/.login |
login | login | ||||
/etc/csh.cshrc |
yes | yes | ||||
/etc/csh.login |
login | login | ||||
~/.tcshrc |
yes | |||||
~/.cshrc |
yes | yes | ||||
$ENV (typically ~/.kshrc) |
yes | |||||
~/.login |
login | login | ||||
~/.logout |
login | login | ||||
/etc/profile |
login | login | login | login | ||
~/.profile |
login | login | login | login | ||
~/.bash_profile |
login | |||||
~/.bash_login |
login | |||||
~/.bash_logout |
login | |||||
~/.bashrc |
int.+n/login | |||||
/etc/zshenv |
yes | |||||
/etc/zprofile |
login | |||||
/etc/zshrc |
int. | |||||
/etc/zlogin |
login | |||||
/etc/zlogout |
login | |||||
~/.zshenv |
yes | |||||
~/.zprofile |
login | |||||
~/.zshrc |
int. | |||||
~/.zlogin |
login | |||||
~/.zlogout |
login |
Explanation:
- blank means a file is not read by a shell at all.
- "yes" means a file is always read by a shell upon startup.
- "login" means a file is read if the shell is a login shell.
- "n/login" means a file is read if the shell is not a login shell.
- "int." means a file is read if the shell is interactive.
Read more about this topic: Unix Shell
Famous quotes containing the words files and/or shells:
“Here files of pins extend their shining rows,
Puffs, powders, patches, bibles, billet-doux.”
—Alexander Pope (16881744)
“The etymologist finds the deadest word to have been once a brilliant picture. Language is fossil poetry. As the limestone of the continent consists of infinite masses of the shells of animalcules, so language is made up of images or tropes, which now, in their secondary use, have long ceased to remind us of their poetic origin.”
—Ralph Waldo Emerson (18031882)