TraceLife

真正的幸福,在于对平淡生活的热爱……

导航

各种 shell 对应的配置文件

Posted on 2012-04-27 16:56  hallo  阅读(566)  评论(0编辑  收藏  举报

下面列举一下各种 shell 对应的配置文件:

Bourne Shell (sh)  -----  .profile

Korn Shell (ksh) ----- .profile (兼容 sh)

C Shell (csh) ----- .login

Bourne Again Shell (bash)  ----- bash被设计成兼容sh,ksh,并有csh的特征, 所以会在用户的主目录下依次查找.bash_profile,.bash_login,.profile文件,并用找到的第一个作为自己的配置文件;

 

When you start a login shell, bash consults the following files in the specified order:
1. /etc/profile
2. ~/.bash.profile
3. ~/.bash_login
4. ~/.profile
When you start a nonlogin shell, bash consults only one startup file, ~/bash.rc.