首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 其他相关 >

bash几个rc文件的差异

2013-10-22 
bash几个rc文件的区别http://stackoverflow.com/questions/415403/whats-the-difference-between-bashrc-b

bash几个rc文件的区别

http://stackoverflow.com/questions/415403/whats-the-difference-between-bashrc-bash-profile-and-environment上写:
/etc/profile       The systemwide initialization file, executed for login shells~/.bash_profile       The personal initialization file, executed for login shells~/.bashrc       The individual per-interactive-shell startup file~/.bash_logout       The individual login shell cleanup file, executed when a login shell exits~/.inputrc       Individual readline initialization file
在我的ubuntu下,/etc/profile应该在开机启动阶段执行,~/.bashrc仅在起新的bash时执行,如果需要:

ssh localhost 'echo $JAVA_HOME'中显示需要的JAVA_HOME,需要在~/.bash_profile中,因为启动了login,但是没有启bash。

热点排行