{"id":5265,"date":"2016-09-30T13:28:26","date_gmt":"2016-09-30T13:28:26","guid":{"rendered":"http:\/\/blog.bachi.net\/?p=5265"},"modified":"2016-09-30T13:57:26","modified_gmt":"2016-09-30T13:57:26","slug":"bashrc-vs-bash_profile","status":"publish","type":"post","link":"https:\/\/blog.bachi.net\/?p=5265","title":{"rendered":"bashrc vs. bash_profile"},"content":{"rendered":"<p><a href=\"http:\/\/www.joshstaiger.org\/archives\/2005\/07\/bash_profile_vs.html\">.bash_profile vs .bashrc<\/a><br \/>\n<a href=\"http:\/\/stackoverflow.com\/questions\/415403\/whats-the-difference-between-bashrc-bash-profile-and-environment\">What&#8217;s the difference between .bashrc, .bash_profile, and .environment?<\/a><\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nFreeBSD:\r\n\r\n$ strings \/usr\/local\/bin\/bash | grep profile\r\nnoprofile\r\n\/etc\/profile\r\n~\/.profile\r\n~\/.bash_profile\r\n\r\n$ strings \/usr\/local\/bin\/bash | grep bashrc\r\n~\/.bashrc\r\n<\/pre>\n<pre class=\"brush: plain; title: \/etc\/profile and \/root\/.bashrc; notranslate\" title=\"\/etc\/profile and \/root\/.bashrc\">\r\nif &#x5B; &quot;$PS1&quot; ]; then\r\n  if &#x5B; &quot;$BASH&quot; ] &amp;&amp; &#x5B; &quot;$BASH&quot; != &quot;\/bin\/sh&quot; ]; then\r\n    if &#x5B; -f \/usr\/local\/etc\/bash.bashrc ]; then\r\n      . \/usr\/local\/etc\/bash.bashrc\r\n    fi\r\n  fi\r\nfi\r\n<\/pre>\n<h3>see also here<\/h3>\n<p><a href=\"http:\/\/blog.bachi.net\/?p=4697\">blog.bachi.net: Interactive vs. Login Shell<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>.bash_profile vs .bashrc What&#8217;s the difference between .bashrc, .bash_profile, and .environment? FreeBSD: $ strings \/usr\/local\/bin\/bash | grep profile noprofile \/etc\/profile ~\/.profile ~\/.bash_profile $ strings \/usr\/local\/bin\/bash | grep bashrc ~\/.bashrc if &#x5B; &quot;$PS1&quot; ]; then if &#x5B; &quot;$BASH&quot; ] &amp;&amp; &#x5B; &quot;$BASH&quot; != &quot;\/bin\/sh&quot; ]; then if &#x5B; -f \/usr\/local\/etc\/bash.bashrc ]; then . \/usr\/local\/etc\/bash.bashrc fi fi [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-5265","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts\/5265","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5265"}],"version-history":[{"count":3,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts\/5265\/revisions"}],"predecessor-version":[{"id":5269,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts\/5265\/revisions\/5269"}],"wp:attachment":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5265"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5265"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5265"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}