/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 .bashrc的更多相关文章

  1. Bash: about .bashrc, .bash_profile, .profile, /etc/profile, etc/bash.bashrc and others

    Some interesting excerpts from the bash manpage:When bash is invoked as an interactive login shell, ...

  2. linux bash & profile &bash_profile 小结

    login 方式:: su - oracle 依次 /etc/bash.bashrc———— /home/$user/.bashrc ———— /ect/profile ———— /home/$use ...

  3. profile bashrc bash_profile之间的区别和联系

    profile bashrc bash_profile之间的区别和联系 博客分类: Linux   执行顺序为:/etc/profile -> (~/.bash_profile | ~/.bas ...

  4. profile,bashrc,.bash_profile,.bash_login,.profile,.bashrc,.bash_logout浅析 Part 2

    profile,bashrc,.bash_profile,.bash_login,.profile,.bashrc,.bash_logout浅析 Part 2   by:授客 QQ:103355312 ...

  5. profile bashrc bash_profile 之间的区别和联系

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

  6. profile, bashrc, source, setup.*sh

    一. source: 命令是使该文件立刻执行,这样刚才做的修改就可以立即生效了,否则要重新启动系统修改才能生效.(执行其后命令使之立即生效,不用重启) 二.bashrc: 1.linux系统:/etc ...

  7. linux /etc/profile bashrc bash_profile

    文件: /etc/profile  ~/.bashrc  和  ~/.bash_profile 的使用区别: /etc/profile: 全局 环境变量等,在机器重启后执行一次, 用于设置环境变量,更 ...

  8. Linux环境变量文件environment, profile, bashrc含义

    转自:http://www.th7.cn/system/lin/201508/127503.shtml (1)/etc/profile: 此文件为系统的每个用户设置环境信息,当用户第一次登录时,该文件 ...

  9. linux profile\bashrc\bash_profile之间的区别和联系

    /etc/profile 每个用户,首次登录时被执行: /etc/bashrc 每个运行bash shell的用户都执行此文件,当bsh被打开时,该文件被读取: ~/.bash_profile 专用于 ...

随机推荐

  1. elasticsearch 5.1 问题 ubuntu

    1.can not run elasticsearch as root 切换到非root用户 2.main ERROR Could not register mbeans java.security. ...

  2. OPENVPN

    安装 方法1--源码安装yum -y install  pam pam-devel gcc gcc-c++ lzo lzo-devel openssl openssl-devel wget autom ...

  3. git之.gitignore文件用途

    gitignore文件用于忽略无需追踪的文件. 配置文件: $HOME/.config/git/ignore, $GIT_DIR/info/exclude, .gitignore 举例说明: $ gi ...

  4. MSI Error 1603 installing AppFabric 1.1 / Win7 x64

    MSI Error 1603 installing AppFabric 1.1 / Win7 x64  Archived Forums A-B > AppFabric Caching   先说解 ...

  5. 读取DBF文件数据

    #region 返回DBF表 public static System.Data.DataTable getDTFromDBF(string fullPath) { string pDir = Sys ...

  6. 升级Dell的R810固件版本

    1.到下面链接去下载win32版本的EXE固件 http://www.dell.com/support/home/cn/zh/cndhs1/Drivers/DriversDetails?driverI ...

  7. PHP购物车类

    <?php /** * 购物车类 */ session_start(); class Cart{ private static $ins = null; private $items = arr ...

  8. C#中Validating和Validated事件

    http://blog.sina.com.cn/s/blog_6116673a0100fpeo.html 待解读

  9. 由system.currentTimeMillis() 获得当前的时间

    System类代表系统,系统级的很多属性和控制方法都放置在该类的内部.该类位于java.lang包. currentTimeMillis方法 public static long currentTim ...

  10. oracle kill session

    kill session 是DBA经常碰到的事情之一.如果kill 掉了不该kill 的session,则具有破坏性,因此尽可能的避免这样的错误发生.同时也应当注意,如果kill 的session属于 ...