Difference between revisions of "Bash dot files"
Jump to navigation
Jump to search
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
Login Shell (e.g. bash --login): |
|||
Login: |
|||
if [ -f /etc/profile ]; then |
|||
⚫ | |||
⚫ | |||
if [ -f ~/.bash_profile ]; then |
if [ -f ~/.bash_profile ]; then |
||
source ~/.bash_profile |
source ~/.bash_profile |
||
Line 10: | Line 13: | ||
return |
return |
||
fi |
fi |
||
⚫ | |||
⚫ | |||
⚫ | |||
if [ -f ~/.profile ]; then |
if [ -f ~/.profile ]; then |
||
source ~/.profile |
source ~/.profile |
||
return |
|||
fi |
|||
Non-login Shell (e.g. run bash from within another shell): |
|||
⚫ | |||
source ~/.bashrc |
|||
return |
|||
fi |
fi |
Latest revision as of 03:18, 26 January 2011
Login Shell (e.g. bash --login):
if [ -f /etc/profile ]; then source /etc/profile fi
if [ -f ~/.bash_profile ]; then source ~/.bash_profile return fi if [ -f ~/.bash_login ]; then source ~/.bash_login return fi
if [ -f ~/.profile ]; then source ~/.profile return fi
Non-login Shell (e.g. run bash from within another shell):
if [ -f ~/.bashrc ]; then source ~/.bashrc return fi