.bash_profile 、.profile和 .bashrc 区别
来源:互联网 发布:penbeat专用笔 淘宝 编辑:程序博客网 时间:2024/06/07 00:38
之前在安装10gRAC的时候配置的是.bash_profile文件,后来发现有的文档上配置的是.bashrc文件,后来就在网上找了些资料:
.profile 是Bourne Shell (sh)的配置文件. Korn Shell (ksh)兼容sh所以也会使用.profile
.login 是C Shell (csh) 的配置文件
.bash_profile是bash特有的, 由于bash被设计成兼容sh, ksh, 并有csh的特征, 所以会在用户主目录依次查找.bash_profile,
.bash_login, .profile并用找到的第一个作为自己的配置文件.
在Linux下sh是bash的一个链接, 如果bash使用sh命令启动的, 就会以sh兼容方式运行使用.profile
/etc/profile:此文件为系统的每个用户设置环境信息,当用户第一次登录时,该文件被执行.
并从/etc/profile.d目录的配置文件中搜集shell的设置.
/etc/bashrc:为每一个运行bash shell的用户执行此文件.当bash shell被打开时,该文件被读取.
~/.bash_profile:每个用户都可使用该文件输入专用于自己使用的shell信息,当用户登录时,该文件仅仅执行一次!默认情况下,他设置一些环境变量,执行用户的.bashrc文件.
~/.bashrc:该文件包含专用于你的bash shell的bash信息,当登录时以及每次打开新的shell时,该该文件被读取.
~/.bash_logout:当每次退出系统(退出bash shell)时,执行该文件.
另外,/etc/profile中设定的变量(全局)的可以作用于任何用户,而~/.bashrc等中设定的变量(局部)只能继承/etc/profile中的变量,他
们是"父子"关系.
~/.bash_profile 是交互式、login 方式进入 bash 运行的
~/.bashrc 是交互式 non-login 方式进入 bash 运行的
通常二者设置大致相同,所以通常前者会调用后者。
- .bash_profile 、.profile和 .bashrc 区别
- profile、bashrc、bash_profile区别
- .profile,.login,.bash_profile和.bashrc的区别
- .bash_profile、profile和.bashrc的区别
- /etc/profile、/etc/bashrc、.bash_profile和.bashrc的区别
- bash_profile,bashrc,profile等区别
- /etc/profile /etc/bashrc ~/.bash_profile ~/.bashrc 区别
- Linux中profile、bashrc、~/.bash_profile、~/.bashrc、~/.bash_profile之间的区别和联系以及执行顺序
- Linux中profile、bashrc、~/.bash_profile、~/.bashrc、~/.bash_profile之间的区别和联系以及执行顺序
- 配置文件.profile,.login,.bash_profile和.bashrc的区别
- Linux bash_profile和.bashrc以及profile的区别
- Linux中profile、bashrc、bash_profile之间的区别和联系
- profile bashrc bash_profile 之间的区别和联系
- Linux中profile、bashrc、bash_profile之间的区别和联系
- Linux中profile、bashrc、bash_profile之间的区别和联系 .
- profile bashrc bash_profile 之间的区别和联系
- Linux中profile、bashrc、bash_profile之间的区别和联系
- Linux中profile、bashrc、bash_profile之间的区别和联系
- 创建客户-事务码分析
- javascript03
- directfbrc文件的使用及参数的详细说明
- (书摘:用户故事与敏捷方法)第十章 迭代计划
- AfxEnableControlContainer
- .bash_profile 、.profile和 .bashrc 区别
- 【转】C语言静态函数库的制作和使用方法
- Python Paste.deploy 笔记
- 临时对象不能被绑定到非const引用参数上====》扩展到临时对象问题
- 对不起
- 存储过程同时新增两张表,并将第一张表的主键插入第二张表当中
- POJ1195 Mobile phones 二维树状数组 更新节点,查询区域
- N皇后问题
- 母亲