Posted on 2011-12-08 16:53
瘋狂 閱讀(546)
評論(0) 編輯 收藏 所屬分類:
linux 、
unix
linux:/etc/enviroment /etc/profile/ /etc/bashrc ~/.bashrc ~/.bashrc_profile
1 /etc/enviroment里面只有key=value沒用命令,/etc/profile會讀取/etc/enviroment里面設置的變量。
2 /etc/profile中設定的變量(全局)的可以作用于任何用戶,而~/.bashrc等中設定的變量(局部)只能繼承/etc/profile中的變量,他們是"父子"關(guān)系.
3 /etc/profile用于設環(huán)境變量,其他函數(shù)和別名,在/etc/bashrc里設
4 先去調(diào)用系統(tǒng)級的/etc/bashrc的別名和函數(shù),然后才是 ~/.bashrc
5 bash_profile總是被設置成先讀取相同目錄下~/.bashrc的內(nèi)容
aix: /etc/enviroment /etc/profile ~/.profile