V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
Livid
V2EX  ›  Linux

.bash_profile 和 .bashrc 有何不同

  •  
  •   Livid · 2010-10-30 17:40:27 +08:00 · 5569 次点击
    这是一个创建于 4898 天前的主题,其中的信息可能已经有所发展或是发生改变。
    4 条回复    1970-01-01 08:00:00 +08:00
    9hills
        1
    9hills  
       2010-10-30 20:35:19 +08:00
    ubuntu没有.bash_profile,最少默认没有

    默认在.profile里面,.profile里面source了.bashrc
    WinG
        2
    WinG  
       2010-10-30 20:57:53 +08:00
    1个是界面登陆啊
    hitsmaxft
        3
    hitsmaxft  
       2011-02-13 19:16:26 +08:00
    zsh的用户说明第一章说的就是shell的两种状态,分别载入以上两个文件
    如果没记错的话, linux里_profile之后会继续载入rc
    yangxiaoyong
        4
    yangxiaoyong  
       2011-02-13 19:22:52 +08:00
    bash_profile 每次只加载一次

    bashrc 每次在登录或是打开一个shell的时候都会加载一次
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5065 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 09:46 · PVG 17:46 · LAX 02:46 · JFK 05:46
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.