`
Goldice
  • 浏览: 104232 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

Linux中bashrc河bash_profile

 
阅读更多

/etc/profile:此文件为系统的每个用户设置环境信息,当用户第一次登录时,该文件被执行. 并从/etc/profile.d目录的配置文件中搜集shell的设置.

/etc/bashrc:为每一个运行bash shell的用户执行此文件.当bash shell被打开时,该文件被读取.

 

~/.bash_profile 调用 ~/.bashrc

每个用户都可使用该文件输入专用于自己使用的shell信息,当用户登录时,该
文件仅仅执行一次!默认情况下,他设置一些环境变量,执行用户的.bashrc文件.

 

~/.bashrc调用/etc/bashrc

该文件包含专用于你的bash shell的bash信息,当登录时以及每次打开新的shell时,该

该文件被读取. 

 

就是linux登陆时,会加载/etc/profile,也会加载~/.bash_profile。

然后根据语句,~/.bash_profile会调用~/.bashrc, ~/.bashrc会调用/etc/bashrc

 

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics