-
Notifications
You must be signed in to change notification settings - Fork 0
BASH and ZSH initialization sequence
Dmitri edited this page Feb 28, 2021
·
1 revision
Interactive login | Interactive non-login | Script | |
---|---|---|---|
/etc/profile | A | ||
/etc/bash.bashrc | A | ||
~/.bashrc | B | ||
~/.bash_profile | B1 | ||
~/.bash_login | B2 | ||
~/.profile | B3 | ||
BASH_ENV | A | ||
~/.bash_logout | C |
Interactive login | Interactive non-login | Script | |
---|---|---|---|
/etc/zshenv | A | A | A |
~/.zshenv | B | B | B |
/etc/zprofile | C | ||
~/.zprofile | D | ||
/etc/zshrc | E | C | |
~/.zshrc | F | D | |
/etc/zlogin | G | ||
~/.zlogin | H | ||
~/.zlogout | I | ||
/etc/zlogout | J |
Moral:
For bash, put stuff in
~/.bashrc
, and make~/.bash_profile
source it.For zsh, put stuff in
~/.zshrc
, which is always executed.