It is quite confusing if you need to work with multiple, so I make following tables.
zsh
From section STARTUP/SHUTDOWN FILES
of man page zsh
Interactive Login |
Non-Interactive Login |
Interactive Non-Login |
Non-Interactive Non-Login |
/etc/zshenv
$ZDOTDIR/.zshenv
|
/etc/zprofile
$ZDOTDIR/.zprofile
|
– |
/etc/zshrc
$ZDOTDIR/.zshrc
|
– |
/etc/zshrc
$ZDOTDIR/.zshrc
|
– |
/etc/zlogin
$ZDOTDIR/.zlogin
|
– |
bash
From section INVOCATION
of man page bash
default
Interactive Login |
Non-Interactive Login |
Interactive Non-Login |
Non-Interactive Non-Login |
/etc/profile
Then the first one that is readable amongst:
~/.bash_profile
~/.bash_login
~/.profile
|
~/.bashrc
|
$BASH_ENV
|
bash as sh
Interactive Login |
Non-Interactive Login |
Interactive Non-Login |
Non-Interactive Non-Login |
/etc/profile
~/.profile
|
– |
$ENV
|
– |
$ENV
|
– |
tcsh
tcsh does not seem care the interactive mode when start up. if environment version
has lf
, then csh.login
and ~/.login
will run before csh.cshrc
and ~/.tcshrc
, respectively.
From section Startup and shutdown
of man page tcsh
Login |
Non-Login |
/etc/csh.cshrc
|
/etc/csh.login
|
– |
First one that is readable amongst:
~/.tcshrc
~/.cshrc
|
~/.history
~/.login
~/.cshdirs
|
– |
Pingback: Links 9/8/2017: Wine Staging 2.14, Brooklyn 0.2 | Techrights
Pingback: New top story on Hacker News: Startup Sequences of Shells – The Internet Yard