下面列举一下各种 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.

相关文章:

  • 2022-12-23
  • 2021-06-08
  • 2022-01-16
  • 2021-08-15
  • 2021-06-01
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-24
  • 2022-01-12
  • 2021-11-20
  • 2022-12-23
相关资源
相似解决方案