Login shells讀下面的啟動文件:
文件
內容
/etc/profile 對所有用戶開放的全局配置文件 ~/.bash_profile 某個用戶個人的啟動文件,能用作個人的全局設置 ~/.bash_login 如果 ~/.bash_profile找不到,則bash嘗試讀取這個腳本 ~/.profile 如果這兩個文件~/.bash_profile, ~/.bash_login 都找不到,bash就讀取這個文件,這是個默認文件NOTE:
Non-login shell讀取下面的文件:
文件
內容
/etc/bash.bashrc 對所有用戶開放的全局配置文件 ~/.bashrc 某個用戶個人的啟動文件,能用作個人的全局設置可以看下.bash_profile腳本內容:
# .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi # User specific environment and startup programs PATH=$PATH:$HOME/bin export PATH
Bash腳本15分鐘進階教程 http://www.linuxidc.com/Linux/2014-04/100750.htm
10個 Linux/Unix下 Bash 和 KSH shell 的作業控制實例 http://www.linuxidc.com/Linux/2014-03/98159.htm
Ubuntu下shell腳本運行異常:Bash和dash的區別 http://www.linuxidc.com/Linux/2013-10/91100.htm
Bash腳本之for語句if語句以及各種測試語句 http://www.linuxidc.com/Linux/2013-07/87922.htm
什麼是Bash Shell的內建(build in)命令 http://www.linuxidc.com/Linux/2013-06/86039.htm