TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Bash_profile vs. .bashrc

24 pointsby akandiahalmost 11 years ago

3 comments

blippealmost 11 years ago
I would recommend reading[0] instead.<p>[0] <a href="http://www.thegeekstuff.com/2008/10/execution-sequence-for-bash_profile-bashrc-bash_login-profile-and-bash_logout/" rel="nofollow">http:&#x2F;&#x2F;www.thegeekstuff.com&#x2F;2008&#x2F;10&#x2F;execution-sequence-for-b...</a>
评论 #8093720 未加载
Canadaalmost 11 years ago
In my opinion the only thing .bash_profile should do is source .bashrc, that way the environment is consistent regardless of invocation.
RexRollmanalmost 11 years ago
In the example he gives, like many I have seen on the Internet, it tests for .bashrc and if it exists, sources it. But if you didn&#x27;t test it and for some reason .bashrc didn&#x27;t exist, what would happen? And if nothing bad would happen, why test for it?
评论 #8093620 未加载